AJAX change class - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: AJAX change class (/showthread.php?tid=28030) |
AJAX change class - El Forum - 02-27-2010 [eluser]stuffradio[/eluser] Hi, I am using AJAX for clicking on "tabs". When the tab is clicked on, how do I change the class of the item? When an item is active, the class of the list item is on. Example: Code: <li id="item1" class="on">Item 1</li> So how do I take the class off the previously on item, and change the one that was clicked? Any ideas? |