Code causing an issue / Live Search
This support request was posted in Flatbase by ingecorp
- ingecorp August 15, 2018 at 3:52 pm
Good day,
I am having a piece of code causing an issue on my site.
Here’s the code causing the issue:
jQuery(document).ready(function() {
jQuery(‘#live-search #s’).liveSearch({url: ‘https://diccionario.geotecnia.online/?ajax=true&livesearch=true&s=’});
});
Error is: Uncaught TypeError: jQuery(…).liveSearch is not a functionI have been asked to contact the theme developer to change:
jQuery(document).ready(function() {
jQuery(‘#live-search #s’).liveSearch({url: ‘https://diccionario.geotecnia.online/?ajax=true&livesearch=true&s=’});
});to
jQuery(document).ready(function() {
if(typeof jQuery(‘#live-search #s’).liveSearch !== ‘undefined’) {
jQuery(‘#live-search #s’).liveSearch({url: ‘https://diccionario.geotecnia.online/?ajax=true&livesearch=true&s=’});
}
});“That would fix the issue.. Do that and let me know their response”
Waiting to hearing from you,
Ignacio
Juanfra Aldasoro August 16, 2018 at 1:36 pmHi Ignacio,
Thank you for writing.
It seems that some other plugin can be causing conflicts with jQuery. Have you tried deactivating all plugins and testing the search functionality?
Thank you,
Juan.ingecorp August 16, 2018 at 3:03 pmGood day Juan,
As you may alredy know, I’m not an IT expert; nevertheless, the plugin programmer asked me to let you know this:
“Collins from MailOptin here. We try to remove any JavaScript and css loaded when MailOptin customizer is being viewed as a result that broke your script. What we are asking is you add a check to your script that ensure livesearch jquery plugin exist before using it. That will ensure compatibility with both plugin and theme.”
Can you help me please?
Ignacio
Juanfra Aldasoro August 17, 2018 at 3:50 pmHola Ignacio,
I hope you’re doing well.
Please understand that if another plugin takes away our scripts, then it will cause trouble. I am sorry but, we cannot provide support in customizations like this one: https://nicethemes.com/article/support-vs-customizations-2/
Perhaps you can find a way to put the code they suggested?
Best,
Juan.
You must be logged in to reply to this topic.