prevObject: x.fn.x.init[1]
function UK(){
var cached = {
cacheListCatalog : false
};
var method = {
removeListCategory : function(){
console.log(cached.cacheListCatalog);
console.log($(".installCatalog ul li"));
}
};
var category = {
install : function(){
method.removeListCategory();
}
};
return {
init : function(){
cached.cacheListCatalog = $(".installCatalog ul li");
return $.extend(category);
}
}
}
var UK = UK().init ();
UK.category()
Console:
Это cacheListCatalog: [prevObject: x.fn.x.init[1], context: document, selector: ".installCatalog ul li", jquery: "2.0.3", constructor: function…]
Это $(".installCatalog ul li") если обращаться на прямую: [li, li, prevObject: x.fn.x.init[1], context: document, selector: ".installCatalog ul li", jquery: "2.0.3", constructor: function…]
Хочу сохранить состояние дерева все что находится внутри тега li - в переменную cached.cacheListCatalog Но, к сожалению, он не сохраняет. Подскажите, пожалуйста, в чем причина? |
Разобрался. В итоге сохраняет пустоту, т.к. дерево еще не сформурованно
|
| Часовой пояс GMT +3, время: 06:03. |