I was wondering about the use of return false;
because…
⋅ Sometimes I see functions like that:
function foo(){
⋅⋅⋅
return false;
}
⋅ Sometimes I see the calling of functions like that:
<div onclick="foo(); return false;"></div>
⋅ Sometimes I see both of the above,
⋅ Sometimes I see none of the above.
(I know about the topic What's the effect of adding 'return false' to a click event listener?, but that seems to answer only to my point #2, or am I wrong?)
So I ended up with questions about it.
What is the right way to use return false;
?
And when is it necessary to do so?
When using jQuery, is the right way or the necessity modified ?
Thanks in advance for any answer.