I found this code and I'm wondering why is set to return false?
$("#_plan").on('click', function() {
showChoose();
return false;
});
I found this code and I'm wondering why is set to return false?
$("#_plan").on('click', function() {
showChoose();
return false;
});
Returning false from the click
handler prevents the default action from execution. For example if #_plan
is a submit button or an anchor returning false will prevent the browser from redirecting away from the current page (which is what happens when you submit a form or click on an anchor).
As an alternative you could use the following:
$("#_plan").on('click', function(evt) {
evt.preventDefault();
showChoose();
});
This way the browser will remain on the same page and leave time for the showChoose
function to execute.