Home Forums WoodMart support forum open top menu search box programmatically

open top menu search box programmatically

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #208168

    shuki
    Participant

    Hi, how can i open top menu search box programmatically ?
    i tried

    jQuery('.search-button a').click();

    but it wont work

    Attachments:
    You must be logged in to view attached files.
    #208176

    Artem Temos
    Keymaster

    Hello,

    Here is a correct JS code snippet for this

    jQuery('.whb-main-header .whb-search a').click();

    Kind Regards

    #208212

    shuki
    Participant

    Thanks, it needs to be placed inside

    jQuery(window).load(function($) {
    })

    for it work

    #208213

    Artem Temos
    Keymaster

    Yes, sure. Or you can use our custom JS field in Theme Settings.

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