Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery if else click function

$(document).ready(function(){ 

	var n = $("#example div").length;

	if (n < 2) {
		$("body").css("background", "green");
	} 
	else {
		$("body").css("background", "orange");
	}

});
Source by css-plus.com #
 
PREVIOUS NEXT
Tagged: #jquery #click #function
ADD COMMENT
Topic
Name
6+8 =