Hi Lukas,

The .toggleClass() method takes a class name as its argument. You've put in an id selector -- "#forum-wide".

So doing this ...
        jQuery("#forum").toggleClass("forum-wide");

...will alternately add the "forum-wide" class to the element with id="forum" and remove it from that element.


--Karl
____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Jul 15, 2008, at 12:28 PM, lukas wrote:


Hello! Does anybody see a mistake here? I want to let a DIV disappear
while another DIV needs to change its class. Thanks for your input!

jQuery(document).ready(function() {
jQuery(".toggle-left").click(function() {
jQuery("#left").toggle('slow');
jQuery("#forum").toggleClass("#forum-wide");
});
});

Reply via email to