Categories
Development

How to end JQuery function in if()

I tried to end JQuery function using return; but I want to stop function before running more line of function. My code is here : $(‘#quantity’).on(‘input’,function(e){ var variable = $(‘#var’).val(); if (variable == null) { alert(‘variable is null.’) return; } //Normal code }) When I try to test it //Normal code will be run and […]