Answers for "jquery if else on click"

1

jquery if else on click

$('#myElementID').click(function() {
	var isSomethingTrue = true;
    
    if(isSomethingTrue){
    	alert("something is true");
    }else{
    	alert("something is false");
    }
});
Posted by: Guest on October-23-2019

Code answers related to "Javascript"

Browse Popular Code Answers by Language