Link to home
Start Free TrialLog in
Avatar of Refael
RefaelFlag for United States of America

asked on

jquery click toggle class


Hello Experts,

i have this very simple code which basically add class to the ul list when its clicked.
when the user click on any of the other list i want to remove the class. currently it stays highlighted though i clicked on the next list.

 
$('#faq_collection li a').click( function() {
	$(this).toggleClass('active');

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Refael

ASKER

thank you so much!