Sam Collett wrote:
> Any reason why you can't just do:
>
> $("#workList select").change(function(){
>    alert("Selected: " + this.value);
> });
>
> No bubbling required.

Bubbling is rather handy pretty often. Especially so if you either require 
similar functionality between different elements within a container, or want 
to avoid rebinding events to stuff as it gets loaded / unloaded dynamically 
(ajax or otherwise). It's an easy way to say that "stuff inside x works like 
this", and it keeps working without a hassle when you add / remove stuff 
from it. And you only need to bind a single event listener instead of many.

-- 
Suni 


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to