jquery.mmenu not working with exact same demo code

3.4k Views Asked by At

http://mmenu.frebsite.nl/

  1. Local version of the menu works
  2. Doesn't work when uploaded onto my server. However, the demo version it comes with still works...

Error it gives is Uncaught TypeError: undefined is not a function for the .mmenu() function

<script type="text/javascript">
            $(function() {
                $('nav#menu').mmenu();
            });
</script>

The function is defined, however, in

<link type="text/css" rel="stylesheet" href="jQuery.mmenu-master/src/css/jquery.mmenu.all.css" />

AND jquery is also attached

any thoughts?

Edit: The following is my header info (in case it might help)

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title></title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width initial-scale=1.0 maximum-scale=1.0 user-scalable=yes" />

    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="css/main.css">
    <link rel="stylesheet" href="css/style.css">
    <link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
    <script src="js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>

    <link type="text/css" rel="stylesheet" href="css/demo.css" />
    <link type="text/css" rel="stylesheet" href="jQuery.mmenu-master/src/css/jquery.mmenu.all.css" />


    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script type="text/javascript" src="jQuery.mmenu-master/src/js/jquery.mmenu.min.all.js"></script>
    <script type="text/javascript">
        $(function() {
            $('nav#menu').mmenu();
        });
    </script>
1

There are 1 best solutions below

0
On

use the java-scripts and css hosted on their website rather than one in the example also it seems you need to decorate the element with the following class mm-current