Jquery (metis-menu) Not Working With Iron:router In Meteor
I'm trying to implement a sidebar (leveraging the sidebar from sb-admin-2When I use the side bar as part of main.html, the toggles work perfectly fine. However, when I implement th
Solution 1:
This is how I resolved it.
AppLayout
:
<template name="Index">
<div id="wrapper">
<!-- Navigation -->
{{> navigationBar}}
{{> Sidebar}}
<div id="page-wrapper">
<div class="row breadcrumbPosition">
{{> breadcrumb}}
</div>
<!-- /.row -->
<div class="row">
<div class="col-xs-9 blockablelockable">
{{> yield}}
</div>
</div>
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
</template>
Sidbar.html is a template with the original sidebar implementation.
SidebarHelper.js contains an functino in onRendered
which initializes the metis menu like so:
Template.Sidebar.onRendered( function(){
$('.metisMenu').metisMenu({
toggle: true // disable the auto collapse. Default: true.
});
});
Post a Comment for "Jquery (metis-menu) Not Working With Iron:router In Meteor"