mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
jquery addBack() method added #316
This commit is contained in:
@@ -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