Skip to main content
Improved formatting
Source Link
Tyler2P
  • 2.4k
  • 30
  • 26
  • 34
 $("#mySelectBox").attr("checked") ? alert("this option is selected") : alert("this is not"); 
$("#mySelectBox").attr("checked") ? alert("this option is selected") : alert("this is not"); 
 $("#mySelectBox").attr("checked") ? alert("this option is selected") : alert("this is not"); 
$("#mySelectBox").attr("checked") ? alert("this option is selected") : alert("this is not"); 
Source Link
user20178351
user20178351

 $("#mySelectBox").attr("checked") ? alert("this option is selected") : alert("this is not");