350________

jQuery Events by Example

As a supplement to this article, http://fuelyourcoding.com/jquery-events-stop-misusing-return-false/lets look at jQuery event handling by example. [code] Hello World bar [/code] Event bubbling to parent [code] $(“body” ).click (function() { console.log(“body” ); }) ; $(“p.hello”).click (); >> body;[/code] Original event target on bubbling [code] $(“body” ).click (function(event) { console.log($ (event.target).text ()); }); (“p.hello” ).click (); >> Hello […]

Read More…