Actually, quite the opposite. The living events provide a unique way for handling callbacks. It'll actually trim down the amount of code you use substantially. For 90% of the situations I can imagine, using the generic live() binding cleans up the code, and makes it easier to read/handle on my part. If you absolutely have to deviate for a click function, you can always:
// Default $('.someelement').live('default.click', function(){ }); $('#thiselement.').click(function(){ // .. Super custom }); $('#thiselement').unbind('default.click'); If you namespace your live events, you can then unbind them if you have a custom function to implement. On Jan 27, 9:48 am, errant <d.cheka...@gmail.com> wrote: > Hi Eric, thanks for response. > > Yes, it works that way, but it's kind of unflexible and may be > impossible to implement when dealing with more complex code, don't you > think? > > On 27 янв, 17:29, Eric Garside <gars...@gmail.com> wrote: > > > I believe it has to do with the new event propogation model > > implemented with 1.3 > > > Instead, try using a living event: > > > <ul> > > <li></li> > > <li></li> > > <li></li> > > <li></li> > > <li></li> > > </ul> > > > $('ul li span').live('click', function(){ > > // ... > > > }); > > > $('ul li').append('<span>Click me</span>'); > > > That should work. > > > On Jan 27, 8:15 am, errant <d.cheka...@gmail.com> wrote: > > > > Here is the code: > > > > HTML: > > > > <ul> > > > <li></li> > > > <li></li> > > > <li></li> > > > <li></li> > > > <li></li> > > > </ul> > > > > JS: > > > > $(function(){ > > > > var handle = $('<span>Click me</span>'); > > > handle.click(function() { > > > alert('Thanks'); > > > }); > > > $('ul li').append(handle); > > > > }); > > > > With jQuery 1.2.6, each time I click on any list's element it shows > > > alert. With 1.3.1 in FF3, Safari 3 & Opera 9.63 alert is only > > > displaying when I click on first element. In IE6,7 everything is ok. > > > Is this some kind of bug?