Try the below modified .js file. It lets you define a custom onnavback() function, which is executed each time the user navigates back within the drill down menu. For example, something like:
Code:
<script type="text/javascript">
var mymenu=new drilldownmenu({
menuid: 'drillmenu1',
menuheight: 'auto',
breadcrumbid: 'drillcrumb',
persist: {enable: true, overrideselectedul: true}
})
mymenu.onnavback=function(){
alert(this.currentul)
}
</script>
The code in red is new, whereby this.currentul used within the function will give you the index of the destination UL the user is navigating back to relative to the other ULs within the menu when flattened. The top UL will always return 0, the 2nd UL return 1 etc.
Bookmarks