jQuery: css accordion menu in 4 lines
yesterday, chris suggested i consider using an accordion menu on our new, improved left navigation (not yet released). i was sort of “meh” about it — i don’t like extra UI, moving things, extra javascript, or things that don’t work on our customer’s old versions of internet explorer -1.2.
but whatever, i thought i’d take a look.
4 lines of code later, and no changes to the actual css or webpage, i had a working accordion menu:

and to make it slide up and down, i did this:

jQuery is awesome. awesome. the documentation is clear (there will always be a learning curve for a tool like this. i feel their demos and tutorials aren’t that good in terms of figuring out where to start, but once you get the hang of things, the docs are great for finding what you need, quick.)
i might do a talk about the awesomeness of jquery at the next guelph democamp. i am totally in love with this AJAX and DOM scripting javascript toolkit.
i have used prototype.js in the past, but heard great things about jQuery. we started using it internally about 3 weeks ago, and are considering using it on the front-end of our site in our next version.
—————-
UPDATE:
just figured out that i could’ve used [...].slideToggle() to toggle sliding. dunno why i didn’t see that.


November 23rd, 2008 at 8:08 am
sjrok ofgtz ykis
November 23rd, 2008 at 3:50 pm
bvpshu tbck dafctj txijpf
November 24th, 2008 at 3:38 am
jiymd mhdx
December 14th, 2008 at 6:04 am
Nice tutorial Thanks
March 4th, 2010 at 5:54 am
If your sex life isn’t fulfilling there are steps you can take to make it better. A good start is talk to your partner about how you feel.
March 24th, 2010 at 12:06 am
TOmmy I have to say, Tom is delivering hard to refute information. Nice job. I know right where I can get the information you are referencing, I’ll get it and post later. Thanks.
June 21st, 2010 at 8:01 am
This is not you original post, isn’t it?
July 24th, 2010 at 2:53 am
Skate Longboards
July 24th, 2010 at 12:25 pm
Web Design St.catharines
July 28th, 2010 at 7:07 am
Good article dude Thanks
July 28th, 2010 at 9:12 am
Thanks, great text