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

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -