I am beginning to fall in love with jQuery. Screw you, bicycle inventors! :-)
1234567891011121314
functionnext_step(){// note how elegant and self-explanatory this code is.varcl='step_selected';$('.'+cl).removeClass(cl).next().addClass(cl);// Also look at previous version of the code,// before I remembered about chaining methods.// var li = $('.step_selected');// li.removeClass('step_selected');// li.next().addClass('step_selected');// Not as sexy, right? :-)}