是否可以使用我的 jQuery 在选择(链接)中进行选择?
我基本上有这个,一旦我克隆了它,新克隆中还有 2 个 DIV,我也需要使用 jQuery 更改它们,这些嵌入的 div 有 ID,我可以把它放在一个新行上并重新选择使用 $
但我认为 jQuery 允许链接,但不显示已选择的 jQuery 表达式中的选择。这是我的代码
var obligatoryElement = $('#obligatory-template').clone();
$(obligatoryElement).attr('id', 'accessory-' + obligatory);
$('#obligatory-template').after(obligatoryElement);
有什么想法吗?
最佳答案
有find
方法:
$('#some-element').find('a')
关于Jquery 选择与选择?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1083146/