Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search not responding on mobile
This topic contains 8 replies, has 2 voices, and was last updated by tjldesigns 9 months, 2 weeks ago.
- AuthorPosts
- June 8, 2022 at 2:51 pm #37946
Hi Ernest,
I hope you are well, long time no speak :).
I have an odd one, can you see on the mobile search, if you open the menu, it doesn’t respond?
Thank you as always for your help,
TonyaJune 9, 2022 at 1:07 pm #37969Hi Tonya,
I am fine, I hope you are too 🙂
First, try switching these options:
Best,
1. Change the script to the minified source: https://i.imgur.com/gAYPPXi.png
2. ..as well as the auto init: https://i.imgur.com/OntCvjV.png
Clear your site and browser cache, and then if all goes well, it should do the trick.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
June 9, 2022 at 1:37 pm #37971You cannot access this content.June 9, 2022 at 2:39 pm #37972Hi Tonya,
Thank you!
I just noticed from the source, that the output of the search is not correct at all. I have found that in the theme
main.js
file there are multiple lines of code tempering with the search output – moving the elements and such. That is causing the issues unfortuantely.
I do not recommend tempering with the search output via javascript, I can not guarantee support for that.Instead of making copies of the search code via javascript, I strongly recommend doing that via the theme files instead, putting the shortcode to the preferred locations. That will not temper with the output, and will be compatible with future releases as well.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
June 9, 2022 at 4:08 pm #37973You cannot access this content.June 10, 2022 at 10:13 am #37986I understand.
The copy script is simply copying the wrong element there, and this method may actually make a worse score, as printing the search bar twice.
Once the search element is moved, the plugin has to try to detect and re-initialize it, and that unneccessary extra work. Moving 3rd DOM nodes via javascript is a very bad practice, as it detaches event listeners from the origin element as well.If you decide to keep this method, I would advise to move the search into a container element of your own, and move that element instead. That will keep your code functional, even if we make a minor change to the search output.
Best,
Your method was probably working for an earlier version of the plugin.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
June 11, 2022 at 11:23 am #38001Hello again Ernest,
Thanks ever so much again for your feedback, it’s really helpful.
I didn’t code the front-end of this site, but I have relayed your feedback for future, just around moving the structures via js not being advisable for elements such as this.
For now, I have however added a wrapping structure as you suggested, and moved that instead, and that is now working nicely so at least that is resolved.
Many thanks again and have a lovely weekend :),
TonyaJune 13, 2022 at 3:31 pm #38009You are very welcome Tonya 🙂
That should actually do the trick for any future releases.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
June 13, 2022 at 7:09 pm #38015Thanks so much again Ernest, your quick and brilliant help is always so much appreciated :).
- AuthorPosts
You must be logged in to reply to this topic.