Wednesday, November 27, 2013

jPanelMenu Causing Document.Ready() To Run Twice

This line in jquery.jpanelmenu.js is the cause:
$('body > *').not(jP.menu + ', ' + jP.options.excludedPanelContent).wrapAll('<div class="' + 'jPanelMenu-panel' + '"/>');

You will need to comment it out and wrap everything in your body tag manually with:
<div class="jPanelMenu-panel" style="position: relative; left: 0px;">
</div>

The end result will look like:
<body>
<div class="jPanelMenu-panel" style="position: relative; left: 0px;">
all your code....
</div>
</body>


This page helped me figure it out: http://doctype.com/trying-jquery-wrapall-seems-wrap-content-twice

No comments:

Post a Comment