I have a wordpress menu with a hierarchical structure and would like to customize it with the functionality of this bootstrap menu:
http://cssdeck.com/labs/twitter-bootstrap-plain-collapsible-tree-menu
The problem is they use a span around the headers, is there any way I can inject a span around certain elements of my wp_nav_menu?
Here's what I have accomplished so far, for the jquery I have changed it a bit for it to work a bit:
$('.tree-toggler a').click(function (e) {
e.preventDefault();
$(this).parent().children('ul.sub-menu').toggle(300);
});
I've added the tree-toggler class to my menu items but now obviously none of the links will work since I do a preventDefault(). But at least my menu can collapse now. YAY. Since I have no idea how to insert a label around my headers in the wp_nav_menu output, I guess I'll have to find a workaround with a's.