jquery addBack() method added #316

This commit is contained in:
Diullei Gomes
2013-02-22 12:43:53 -03:00
parent 51bbb57e1d
commit edb4df1e4f
2 changed files with 20 additions and 1 deletions
+12
View File
@@ -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");
}