DataTables seems to break my site navigation
DataTables seems to break my site navigation
I have a JavaScript based dropdown navigation menu that uses jquery.EasyMenu (http://www.jqueryscript.net/menu/Unlimited-Multi-level-Dropdown-Menu-with-jQuery-easyMenu.html) and it is working fun, until I add the CDN script link for DataTables. Then when I load the page I all of a sudden get a "Object doesn't support property or method 'easymenu' error for the navigation. If I remove the CDN link for DataTables this error goes away. I would really like to use DataTables but need my menu to work, what do I have to do to get them to play nice?
This is the code that errors out:
$(document).ready(function() { $("#menu").easymenu(); });
Answers
Per the forum rules, please link to a test case showing the issue.
It sounds like you might be loading jQuery more than once, but with out a test case I can't say and am purely guessing.
Allan
I figured out the problem. By changing my function call to function($) it now works.