Forums Forums Search & Filter Pro Use a url parameter to search in ajax shortcodes

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #11199
    • We have a website with a nice looking search results page using ajax shortcodes.
    • We also have a search bar that is sending the searched keyword to this page as a url parameter ?search=keyword
    • We have some code that puts this keyword into the search input field

    But the search itself is not triggered. In a previous version last summer it was working with $( '.sf-field-search input' ).blur(); but with the new version this is not working anymore.

    ¿Can you please help us to make it work again?

    Thanks!

    Ross Moderator
    #11369

    Hey Pablo

    As long as the selector is correct there should be no problem – can you inspect the DOM to make sure that you are using the correct class (this *may* have been changed) – “.sf-field-search”

    If this is correct, then I would suspect something else in your environment has changed, such as a JS errors on the front end.

    Thanks

    Anonymous
    #11543

    Well, the selector was the same. We got it working replacing blur() by this:

    setTimeout( function () {
    	$( '.sf-field-submit input' ).click();
    }, 500);
    Ross Moderator
    #11563

    Glad thats working for you – unfortunately I don’t think I quite understood the purpose of your code.

    Thanks

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