Something like this may work:

<div class="toggler" id="any">blah</div>
$('#any').click(function(){
  $(this).toggleClass('open');
  $(this).toggleClass('toggler');
}

.toggler {background:#fff;}
.open {background:#000;}

.Mario

+593 9 3623535
[EMAIL PROTECTED]
http://mario.ec


On Thu, Nov 6, 2008 at 4:01 PM, jquertil <[EMAIL PROTECTED]> wrote:

>
> .toggler {background:#fff;}
> .open {background:#000;}
>
> $('.toggler').click(function(){
>   $(this).toggleClass('open');
> }
>
> It's really a CSS problem, because the DOM does toggle the classname.
> But the background does not change.
>
> <div class="toggler open">blah</div>
>
> Only solution I can think of is not using toggleClass, but its so nice
> and simple that way. Anyone know a solution by chance? Thanks a lot!

Reply via email to