Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquert toggleClass condition

// add class [class-name] if condition is true
// or else remove it
$('#foo-bar').toggleClass('class-name', condition)
Source by api.jquery.com #
 
PREVIOUS NEXT
Tagged: #jquert #toggleClass #condition
ADD COMMENT
Topic
Name
1+6 =