h1

2 Jquery UI Accordians on the same page.

September 1, 2011

Well for the revamp of my web site I wanted 1 Jquery UI powered accordion to power the sites navigation and 1 for the blog style posts.
After searching for ages I still couldn’t come up with the solution, While on holiday it finally hit me all I had to do was define 2 instances (if that’s the correct terminology) and bingo it worked.

My code:
$(function() {
$( “#accordion” ).accordion();
$( “#news_accordion” ).accordion();
});

Then I just had to call them at the required positions with
id=”news_accordion”
and
id=”accordion”
and it all works !!!
just need to sort out a size issue and I’m finished and can go onto the other scripts.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s