0
Mootool的破坏方法似乎不工作,如果元件没有在DOM:Mootools的 - 销毁不是在DOM对象内的节点
var statics = $('statics').clone(true, true);
statics.destroy('.prototype');
statics.inject($('main'));
在本例中,我试图所有去掉具有来自静态对象的类“原型”的元素。它失败。
有什么建议吗?
编辑:
通过比较,我可以使用类似的方式使用jQuery实现这一目标:
var statics = $('#statics').clone();
statics.remove('.prototype');
$('#main').html(statics);
这可能是为什么我想通过MooTools