Code causing an issue / Live Search

This support request was posted in Flatbase by ingecorp

Request ID #37697 In Progress
  • 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 function

    I 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

    Hi 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.

    Good 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

    Hola 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.

    Thanks for your suggestion.

    Ignacio

    Juanfra Aldasoro

    My pleasure, Ignacio.

    Have a nice day,
    Juan.

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

You must be logged in to reply to this topic.

Login to your Account

Welcome back! Please log in to your account by filling the fields below:

Forgot?

Not a member? Create a free account.

Create a Free Account

You're 27 seconds away from some awesome WordPress free stuff, benefits and more. Create a free account and have access to our free products, benefits and more!

Already have an account? Log in
Secure Server