Moogadelic wrote:
>
> Hi
>
> I tried to put together an easy accordion-like effect:
>
> http://www.smartforce.ch/jquery/ShowHide.html
>
> There is one problem: the selected-class will not be removed if all
> items are closed (again). The class ".selected" should be removed if
> no div is vis
You could try...
$(document).ready(function() {
$('div.showHide> div').hide();
$('div.showHide> h2').click(function() {
$(this).siblings('.selected').andSelf().toggleClass('selected').end().end()
.next('div').slideToggle('fast')
.siblings('div:visible').slideUp('fas
2 matches
Mail list logo