Hi—a simple question from a newbie for you! :) I am trying to toggle the .class of an element (I can't toggle the #id, right?). However, what I have is not working. In short:
----------------------------------------------------------------------- <style> .gallery {background:red;} .list {background:green;} </style> <script language="javascript" type="text/javascript"> $(document).ready(function(){ $("#thing").toggle( function () { $(#resultsview).removeClass('list'); $(#resultsview).addClass('gallery'); }, function () { $(#resultsview).removeClass('gallery') $(#resultsview).addClass('list'); }); }); </script> <p id="thing">click</p> <ul id="resultsview" class="list"> <li>blah</li> <li>blah</li> </li> ----------------------------------------------------------------------- What am I doing wrong? Thanks for any advice! unxx