mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-29 12:40:34 +08:00
jquery addBack() method added #316
This commit is contained in:
1 parent
51bbb57e1d
commit
edb4df1e4f
2 files changed
+20
-1
No files matched your search
@@ -2240,3 +2240,15 @@ $('#item').click(function(e) {
|
||||
if (e.ctrlKey) { console.log('control pressed'); }
|
||||
if (e.altKey) { console.log('alt pressed'); }
|
||||
});
|
||||
|
||||
function test_addBack() {
|
||||
$('li.third-item').nextAll().addBack().css('background-color', 'red');
|
||||
|
||||
$("div.left, div.right").find("div, div > p").addClass("border");
|
||||
|
||||
// First Example
|
||||
$("div.before-addback").find("p").addClass("background");
|
||||
|
||||
// Second Example
|
||||
$("div.after-addback").find("p").addBack().addClass("background");
|
||||
}
|
||||
Reference in new issue
Block a user