[英]Prototype Equivalent in jQuery
What will be the equivalent of below prototype in jQuery? jQuery 中下面原型的等价物是什么?
rowTag = 'li' , style = ('display', 'none') and
html = <div class="nobr">..... </div>
element = new Element(rowTag, style).insert(html);
You can create element and assign attributes like this:您可以像这样创建元素并分配属性:
$('<tag/>', {
id: 'foo',
text: 'Go to Google!'
});
and then you can use one of DOM Insertion methods然后您可以使用其中一种DOM 插入方法
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.