PDA

View Full Version : Help wtih Drilldownmenu



val
02-01-2010, 09:04 PM
1) Script Title: Drill Down Menu (v1.6)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/drilldownmenu.htm

3) Describe problem:
Works fine, but is always the last Jquery script that works.
Other perfectly valid Jquery statements after it result in an error.
The same code which runs when put before the drilldown menu,
doesn't work any more when put after the menu.
Example: (in Firefox 3.0)
------------
1) This works:
---------------------

$(document).ready(function(){
$("#datepicker").datepicker({ dateFormat: 'yy-mm-dd', defaultDate: endDate, minDate: startDate, maxDate: endDate, inline: true});

var mymenu=new drilldownmenu({
menuid: 'drillmenu1',
menuheight: '200',
breadcrumbid: 'drillcrumb',
filesetting: {url:'navlist.html', targetElement:'drillarea'},
persist: {enable: true, overrideselectedul: false},
selectedul: 'sul'});
});
-----------------------------------------------------

2) This makes problems: ($ is not a function)
-------------------------------------------------------
$(document).ready(function(){
var mymenu=new drilldownmenu({
menuid: 'drillmenu1',
menuheight: '200',
breadcrumbid: 'drillcrumb',
filesetting: {url:'navlist.html', targetElement:'drillarea'},
persist: {enable: true, overrideselectedul: false},
selectedul: 'sul'});

$("#datepicker").datepicker({ dateFormat: 'yy-mm-dd', defaultDate: endDate, minDate: startDate, maxDate: endDate, inline: true});
});

-------------------------------------------------------------
This error is not only limited to above example but is reproducible with virtually anything. Putting the drilldown menu in the end is not a solution for me, because I use ajax to load other pages that contain jquery scripts.
Any help will be appreciated. Its a great menu and I would love to use it.

val
02-01-2010, 11:24 PM
Ok, I figured it out by trial and error.
Any jquery code placed after the drilldown menu should start with
jQuery instead of $. Then it all works.