Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery hasclass

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