Chomper Stomping jQuery/JavaScript/CSS 3/HTML 5, Java/PHP/Python/ActionScript, Git, Chrome/Firefox Extensions, Wordpress/Game/iPhone App Development and other random techie tidbits I've collected

jQuery Diagonal Accordion

diagonalAccordion is a jQuery plugin that allows for accordion functionality, but in a diagonal angle of your choice!

I forked Charles Marshall's diagonal-accordion- plugin (on github) which allowed for a 45 degree angle accordion and hacked it to allow for any angle.

Use it like:

$("#someElement").diagonalaccordion({
acc_width:500,
acc_height:300,
bar_size:45,
speed:'slow',
accordion:'.accordion',
coverage:4,
diagAdjust: 3
});

Or even just:

$("#someElement").diagonalaccordion({
diagAdjust: 5
});

The only difference between using my plugin and his is the diagAdjust parameter. This parameter allows for incremental adjustments away from 45 degree angles. The bigger number you provide, the shallower the angle gets, until at number 11 it is effectively no angle. then after 11 it starts angling the other way.

Here's the official demo for the original plugin. Like I said, mine works exactly the same way, it just has an extra param to use.

UPDATE: Charles Marshall (tinyjs) accepted my pull request, meaning my fix is now an official part of the Diagonal Accordion plugin. W00t! \o/

BONUS: See the doctype.com post that spawned this patch.

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.