Question

I cannot get jQuery.mmenu plugin to work with Django when used inside a template. If I place the demo into the static folder, the demo pages function as advertised. But when Django serves the demo pages as templates, nothing happens when the menu is clicked.

Chrome provides this feedback:

Uncaught TypeError:
    Object #<Object> has no method 'off'                     jquery.mmenu.js:352
    $.(anonymous function)._initBlocker                      jquery.mmenu.js:352
    $.(anonymous function)._init                             jquery.mmenu.js:229
    $.(anonymous function)                                   jquery.mmenu.js:54
    (anonymous function)                                     jquery.mmenu.js:732
    jQuery.extend.each                                       jquery.js:580
    jQuery.fn.jQuery.each                                    jquery.js:245
    $.fn.(anonymous function)                                jquery.mmenu.js:724
    (anonymous function)                                     (index):17
    jQuery.extend.ready                                      jquery.js:392
    DOMContentLoaded

                                     jquery.js:745

Iceweasel (Firefox) provides this:

TypeError: glbl.$blck.off is not a function @            jquery.mmenu.js:352
Was it helpful?

Solution

Are you sure you use at least jQuery 1.7?

From jquery.mmenu.js:

* @requires jQuery 1.7.0 or later

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top