Category Archives: jQuery

jQuery Accordion (play that tune m8!)

I have found lots of jQuery plugins that offer the solution to the problem of the accordion. But, if I find a problem easy to solve, I prefer to rely on my own design. So, here goes:


You want to create an accordion, that is, a group a divs (or any other kind of block DOM elements for that matter) that appear when a “button” is pressed. Continue reading

jQuery – Which button is pressed?

OK, this is the same concept, as the one posted here, in the AS3 series. jQuery is a great tool, so I am trying to work on it, applying ideas from AS3 to jQuery; “porting codes”, if you like (better:porting concepts). The fact is that everything in jQuery seems (and is) ridiculously easier. It is not only the power of the jQuery framework, but also the DOM model that actually takes over a lot of the operations and calculations that need to be done “by hand” in other environments – such as AS3. For people that have struggled hopelessly with JavaScript for many years, jQuery is really an invaluable tool. So, a series of articles written in jQuery is starting, with this one.

As I already said, the problem is the same with the previous post:


You need to show to the user which button is pressed – but also, if the user presses another button of your buttons-group to “unpress” the previous one.
Continue reading