Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

change background ternary operator jquery

////////////////////////////////////
var box = $("#blackbox");
// If this condtion is true 	 // then apply this background		//Else Apply this background
box.css('background') == 'pink' ? box.css({'background':'black'}) : box.css({'background':'pink'}); 
////////////////////////////////////
 
PREVIOUS NEXT
Tagged: #change #background #ternary #operator #jquery
ADD COMMENT
Topic
Name
8+5 =