This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // $.fn.newContent behaves kinda like .live(), it will act on elements that match the | |
| // selector now, or in the future... It automatically runs on any elements immediately | |
| // matched, and also runs once on document ready. You then call .newContent() on any | |
| // freshly created content to trigger searching it | |
| // It will call the given callback function in the context of a | |
| // jQuery set that matches the selector... | |
| $("li.test").newContent(function() { | |
| this.css("color", "red"); |