How to Turn jQuery Accordion into CSS3 Accordion
http://css.dzone.com/articles/how-turn-jquery-accordion-css3
Have you ever used ordinary accordion plugins in your projects? I
would believe so! Most of them use javascript to work (or jQuery).
Usually we use such plugins (accordions) to build a promo with images, a
little photo gallery, or in case we have to build an advertisement
with a list of product features. We did some research and came to the
conclusion that sometimes we don’t need to use any script in order to
build accordions. We can just use the power of CSS3. We can handle the
OnClick event and use custom animation.
I prepared three versions with accordions. For the first demonstration we use jQuery to build an accordion. I selected liteAccordion jQuery plugin (http://nicolahibbert.com/demo/liteAccordion/) as an accordion plugin for out test purposes. See how it works:
That’s all, our own CSS3-based accordion is complete! You can check it in action:
But that’s not all for today, as a bonus, I prepared a third demo for you with an animated accordion.
In order to do it I recommend disable onclick behavior, and apply new animation:
Conclusion
Now that is all for today. We have just created three different demos: the first one with jQuery, the second and the third – with pure CSS3. I hope that you like it. Good luck!
'프로그래밍 > Script' 카테고리의 다른 글
20 New Essential jQuery Plugins (0) | 2012.10.16 |
---|---|
[Style] 15 Online HTML5 Tools for Web Designers (0) | 2012.10.11 |
10 Best jQuery Google Maps Plugins (0) | 2012.10.05 |
10 Responsive jQuery Slider Plugins (0) | 2012.10.05 |
6 jQuery Plugins for Book Like Page Flip Effect (0) | 2012.10.05 |