Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery add class

if ($( "#foo" ).hasClass('className')) {
	$( "#foo" ).removeClass( 'className');
} else {
  $( "#foo" ).addClass( 'className');
}
 
PREVIOUS NEXT
Tagged: #jquery #add #class
ADD COMMENT
Topic
Name
9+4 =