Toggle category list on search bar focus

This topic contains 3 replies, has 3 voices, and was last updated by  Stiofan O’Connor 5 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #441307

    adminparentland-pt
    Expired Member
    Post count: 172

    Hi,

    I would like to add a toggle function to the search bar, that would show/hide a category list.
    Thought of adding a widget and show/hide it through CSS with the adjacent sibling selector

    #cpt_listings-1 {
    display: none;
    }
    input:focus + div#cpt_listings-1 {
    display: block;
    }

    but this requires that the widget/shortcode is added immediately after the search text box.
    Have been looking around in the templates but can’t find where the search box is coded, that I can either use a hook or hard-code the shortcode immediately after. Can you please help?
    (or otherwise suggest a different strategy?)

    Thanks
    Andre

    #441310

    Guust
    Moderator
    Post count: 29970

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #441311

    adminparentland-pt
    Expired Member
    Post count: 172

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #441352

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

Viewing 4 posts - 1 through 4 (of 4 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket