diff options
author | Kyle Kaminski <kyle@xenomedia.com> | 2014-03-24 21:24:29 -0500 |
---|---|---|
committer | Kyle Kaminski <kyle@xenomedia.com> | 2014-03-24 21:24:29 -0500 |
commit | b40d19044568166aa01a9f3cadcd371358a91364 (patch) | |
tree | 5e41f1411bb831dc16ed2ff0e61bc1058e487794 | |
parent | 9104c7c3b155a0c9d7dbefffd71987c4cc14182a (diff) | |
download | websandbox-b40d19044568166aa01a9f3cadcd371358a91364.tar.gz websandbox-b40d19044568166aa01a9f3cadcd371358a91364.tar.bz2 websandbox-b40d19044568166aa01a9f3cadcd371358a91364.zip |
add info on stop propagation in jquery
-rw-r--r-- | notes.txt | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -2,3 +2,10 @@ - $(function() {} is same as $(document).ready(function() {}, $(window).load(function () {} comes later in rendering process when all tags are ready such as images + +- stop the default action + e.g. you have an anchor and register a listener for a .click() event using + jquery, but you don't want default href="foo" behavior so you do: + + event.preventDefault(); /* prevent href from doing its job */ + return false; /* stops bubbling up */ |