PDA

View Full Version : Collapsing Accordion Jquery Menu



propoo
06-03-2010, 10:23 PM
1) Script Title: glossy Accordion menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu-glossy.htm

3) Describe problem:

Hi,

I am new to this forum and absolutely love it(that is not a problem ;).

I tried searching answer for this but did not find anything helpful therefore I am posting. I am using accordion menu in .net master page. On page load I want to expand menu depending on which page I am currently on therefore I cannot use defaultexpanded. On page load of each page I want to want to collapse respective menu. I don't want to split menu like suggested here: http://www.dynamicdrive.com/forums/showthread.php?t=49529

Thanks!

ddadmin
06-03-2010, 11:08 PM
The script doesn't have any built in mechanism for determining which header corresponds to the current page the menu is on and hence expand that header. This is really something you need to implement on your own, then once determined the header that should be expanded, use one of the functions described here (http://www.dynamicdrive.com/dynamicindex17/ddaccordion_suppliment.htm) to get the menu to expand that header.

propoo
06-04-2010, 05:38 PM
Thanks for information. I tried using something like this on page load but it does not work, any suggestion?

ClientScript.RegisterStartupScript(Me.GetType(), "someScript", "ddaccordion.expandone('submenuheader', 0);", True)

OR

ClientScript.RegisterStartupScript(Me.GetType(), "someScript", "ddaccordion.expandone('submenuheader', 1); return false", True)

for testing purposes I used link as below and it worked but I want this to be executed on page...

<a href="#" onClick="ddaccordion.expandone('submenuheader', 0); return false">Expand 1st header</a>
<a href="#" onClick="ddaccordion.expandone('submenuheader', 1); return false">Expand 2st header</a>