Jquery UI accordion question - how would you approach this?
Posted
by E.J. Brennan
on Stack Overflow
See other posts from Stack Overflow
or by E.J. Brennan
Published on 2009-03-15T04:13:20Z
Indexed on
2010/04/12
23:02 UTC
Read the original article
Hit count: 349
jquery-ui
I am using jquery UI accordion control in one of my apps asp.net apps. The data for the accordion comes from a database, and each database record has an ID, a Title Field and a content field. The title is the heading, and the content is the data that shows up when the draw is opened...
I'd like to be able to call my page like this:
http://www.mywebsite.com/mypage.aspx?ID=123
and have it display all the data (as it does now), but then have the default 'drawer' of the accordion open to the section that corresponds to the ID number passed in on the url...there are about 50 sections on the page.
Any suggestions on how to approach this? My questions is specific to the jquery accordion function, the rest I know. So where would be the best place to 'tag' the drawer with the unique ID's, and then what is the snippet of javascript code (I assume) that I would use 'open' that drawer based on the ID passed in??
Thanks!
© Stack Overflow or respective owner