Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1201598

    sgchan
    Participant

    I am experiencing this error “c.hoverIntent is not a function” when I try to hover over the menu (kindly refer to http://sanokil.geeksontap.asia/hygiene-services/). It happens because I have a RAW Content that loads JQuery and I suspect it conflicts with the JQuery used in X.

    This is more of a JQuery question… could use advice on how I have resolve this conflict?

    Many thanks in advance.

    #1201611

    sgchan
    Participant
    This reply has been marked as private.
    #1201677

    Christopher
    Moderator

    Hi there,

    Please move scripts from raw content element to cornerstone settings tab/custom jS.

    Hope it helps.

    #1201720

    sgchan
    Participant

    Hi Christopher,
    Thanks for responding back… I have moved the script to Custom JS but seem to have difficulty load JQuery inside the function.

    // Load the script
    var script = document.createElement(“SCRIPT”);
    script.src = ‘https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js’;
    script.type = ‘text/javascript’;
    document.getElementsByTagName(“head”)[0].appendChild(script);

    But on the other hand, if I load it outside of the function, it will conflict with X Theme’s JQuery.

    Any suggestions?

    Again, many thanks!

    #1202021

    Lely
    Moderator

    Hi There,

    By default, wordpress loads jquery library and not the theme. No need to load it again. Would you mind clarifying why do you have to add those code again?

    #1202262

    sgchan
    Participant

    Hi Lely,
    Thanks for clarifying. I had thought the theme was loading JQuery.

    The JQuery code is basically doing a hover over and replacing the button image with another image plus displaying some pointer lines.

    Regards

    #1202425

    Darshana
    Moderator

    Hi there,

    You can ignore loading jQuery library, however in your code, use jQuery instead of $ sign. That should compatible with existing library.

    Instead of
    $(function() {});

    Use:
    jQuery(function() {});

    Hope that helps.