Bug Tracker

Opened 7 years ago

Closed 7 years ago

#10400 closed feature (invalid)

Leveraging the powers of .live()

Reported by: anonymous Owned by:
Priority: low Milestone: None
Component: misc Version: 1.6.4
Keywords: Cc:
Blocked by: Blocking:

Description

If we already have such a great feature as .live() it would be awesome if one could call .live() with a function as the only paramater. e.g.

$('.greenDivs').live(function() {

$(this).css('color','green');

});

This would make all .greenDivs elements green, existing and newly added ones. It's like the livequery plugin does. I think this feature would be useful enough to add it to the main library.

Change History (1)

comment:1 Changed 7 years ago by Rick Waldron

Component: unfiledmisc
Priority: undecidedlow
Resolution: invalid
Status: newclosed

live is awful.

The behaviour you describe is actually _exactly_ how CSS works already.

Note: See TracTickets for help on using tickets.