I am pretty new to JS - so just wondering whether you know how to solve this problem.
Current I have in my code
JavaScript version:
myButton.onclick=function(e){ e.preventDefault(); // code return false; }
jQuery version:
$('.myButtonClass').click(function(e){ e.preventDefault(); // code return false; });
This just do the job well! :)