Skip to main content

Bug Tracker

Side navigation

#10400 closed feature (invalid)

Opened October 02, 2011 02:22PM UTC

Closed October 02, 2011 08:03PM UTC

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.

Attachments (0)
Change History (1)

Changed October 02, 2011 08:03PM UTC by rwaldron comment:1

component: unfiledmisc
priority: undecidedlow
resolution: → invalid
status: newclosed

live is awful.

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