Answers for "jquery check if select option is selected"

1

jquery check if select option is selected

$(document).ready(function(){
	
	$(".yes").hide();
	$(".no").hide();

	$("#existing-subscriber").change(function(){
	
		if ( $(this).val() == "Yes" ) { 
			$(".yes").show();
			$(".no").hide();
        }
        if( $(this).val() == "No" ) { 
			$(".no").show();
			$(".yes").hide();
        }
     
    }); 
	
});
Posted by: Guest on April-14-2021

Code answers related to "jquery check if select option is selected"

Code answers related to "Javascript"

Browse Popular Code Answers by Language