DataTables seems to break my site navigation

DataTables seems to break my site navigation

Eagle_f90Eagle_f90 Posts: 2Questions: 1Answers: 0
edited January 2016 in Free community support

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

  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin

    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

  • Eagle_f90Eagle_f90 Posts: 2Questions: 1Answers: 0

    I figured out the problem. By changing my function call to function($) it now works.

This discussion has been closed.