Version 1.0
Add collapsingMenu.js
to the HEAD
of your page:
<script type='text/javascript' src='<%baseurl%><%basename%>/site/js/collapsingMenu.js'></script>
Then call collapseMenu()
on ready
.
The most common usage scenario with Indexhibit would be to add the following to [...]/site/templatefolder/index.php
in the <head>
:
<script type='text/javascript'>
$(document).ready(function () {
collapseMenu();
});
</script>
collapseMenu()
can be passed an optional string
or number
value corresponding to the menu you want to collapse/expand.
collapseMenu('Projects'); // Will collapse the Projects menu
or
collapseMenu(3); // Will collapse the third menu
If no option is passed all menus will automatically collapse and expand.
This plugin adds three classes to your source:
cm
is added to eachUL
cm-expanded
orcm-collapsed
are added eachUL
depending on its current state.