I have the following snippet of code. I want some code to run during the 'change' event when clicking on a "select" input field. If the value of the option selected is zero, I would like to abort and not execute the remaining code. Here is the snippet :
$select.on('change',function(){
var newYear = this.value;
if(this.value === 0){
studentDiv.hide();
//I would like to return from here,and not execute any remaining code..
}else{
So how do I "return" from the the spot where I put the comment ? Typing return; doesn't seem to do anything ...