javascript - JQuery events cause page reload. How to fix? -
i'm observing behavior onclick events cause page reload.
$('#target').click(function(){ $('#target').hide(); })
so object shown, hides on click, page reloads , object shown again. i'm working on website setup before me, i'm not entirely aware of parts. idea might cause behavior , how fix it?
add a
return false;
as last statement link not called, function (onclick) executed.
Comments
Post a Comment