Search not working on fixed scroll header

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Search not working on fixed scroll header

This topic contains 4 replies, has 2 voices, and was last updated by Kaelo Benn Kaelo Benn 8 years ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #6888
    Kaelo Benn
    Kaelo Benn
    Participant

    Good day Support

    As mentioned before from our mail through themeforest, we just finished setting up ajax search pro into our new theme for skymartbw.com. We then proceeded to use the plugin STICK MENU, to get our header on fixed position during scroll. Now i have an issue of the search bar not working when it is on a sticky position.

    Last but not least, is it possible to highlight or bolden the key word that was typed in search result similar to amazon?

    please help.

    thank you

    kaelobenn

    #6889
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    From what I can see the Sticky Menu has an original and cloned container of itself on the same page. I’m guessing it basically uses the clone for when the sreen is scrolling.
    There is a huge problem with that approach: it also clones ajax search pro as well. This is never going to work, as the javascript event handlers cannot be cloned. If you put any kind of javascript event driven element to that menu, it’s going to fail, it’s not exclusive to ajax search pro, nothing would work that way.

    I’ve looked at the code via FTP and the header is cloned via javascript, so there is nothing I can do about it. It is simply impossible to clone html element with the event handlers. Moreover it does not change the element IDs either, so there are multiple elements with the same ID, which is invalid HTML as well.

    As a solution I would suggest not using javascript cloning in the header menu, instead simply creating the “clone” HTML in the header.php file and remove the javascript cloning completely. That way the same search shortcode would be used twice and it would work correctly. It’s also much faster and safer, and you would be able to use any kind of element in the header that uses javacript.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #6896
    Kaelo Benn
    Kaelo Benn
    Participant

    Thank you Mr. Marcinko for the insight and your strong suggestion on how to proceed. We will inseminate the sticky plugin completely and hard code the fixed header on scroll (though we are newbies).

    regarding the second question, about highlighting or making the keyword searched bold on search results. can this be achieved on a similar format to amazon?

    thank you

    regards

    #6898
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Oh, sorry I forgot about the highlighter 🙂

    There is a simple keyword highlighter implemented, you can enable it on the Layout Options -> Results Behavior panel: https://i.imgur.com/djOveqW.png

    It’s not as clever as the one on amazon, but it should do the trick.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #8487
    Kaelo Benn
    Kaelo Benn
    Participant

    Thank you

    its working wonderfully well.

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

The topic ‘Search not working on fixed scroll header’ is closed to new replies.