Tagged: x
-
AuthorPosts
-
October 4, 2016 at 2:30 am #1201598
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.
October 4, 2016 at 2:32 am #1201611This reply has been marked as private.October 4, 2016 at 3:47 am #1201677Hi there,
Please move scripts from raw content element to cornerstone settings tab/custom jS.
Hope it helps.
October 4, 2016 at 4:40 am #1201720Hi 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!
October 4, 2016 at 9:35 am #1202021Hi 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?
October 4, 2016 at 12:18 pm #1202262Hi 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
October 4, 2016 at 2:09 pm #1202425Hi 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.
-
AuthorPosts