web_based: (Default)
[personal profile] web_based
 jQuery UI has a nifty plugin for an accordion widget. It's pretty much plug-and-play, but it's missing an important and much-requested feature: the ability to specify one or more headers in your accordion as being un-accordionable. This is particularly useful when using the accordion for navigation, which is what I'm doing.

You'd think this would be easy to do by either leaving the content div associated with the header empty or by forcibly overriding the events attached to the header itself. But the former causes the widget to hide/show a small blank area, and I couldn't seem to do the latter.

So I just modified the widget to look for a specific CSS class on each header and, if it is there, ignore trigger events. Easy as you please, took 3 lines of code.

I <3 jQuery. I <3 it so much I almost <4 it.
From:
Anonymous
OpenID
Identity URL: 
User
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org


 
Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.

Profile

web_based: (Default)
web_based

April 2010

S M T W T F S
     1 23
4567 8910
11121314151617
1819 2021222324
252627282930 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 20th, 2017 12:27 am
Powered by Dreamwidth Studios