¡@

Home 

2014/10/16 ¤W¤È 12:08:48

jquery Programming Glossary: span.green

Direct vs. Delegated - jQuery .on()

http://stackoverflow.com/questions/8110934/direct-vs-delegated-jquery-on

I made a test page to experiment with the concept. But both following constructs lead to the same behavior div#target span.green .on click function alert this .attr class is clicked or div#target .on click span.green function alert this .attr class.. the same behavior div#target span.green .on click function alert this .attr class is clicked or div#target .on click span.green function alert this .attr class is clicked Maybe someone could refer to a different example to clarify this point Thanks... clarify this point Thanks. javascript jquery event bubbling share improve this question Case 1 direct div#target span.green .on click function ... Hey I want every span.green inside div#target to listen up when you get clicked on do X. Case 2 delegated..