Jquery 选择与选择?

标签 jquery css

是否可以使用我的 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/

相关文章:

php - Symfony 3 - {{asset ('assets/css/main.css' )}} 不工作

javascript - PhantomJS/CasperJS AssertExists() 失败

javascript - jQuery 相当于获取 Canvas 的上下文

css - 具有 CSS3 渐变的大块

javascript - 如何向具有 overflow hidden 的父 div 的 div 添加滚动条?

html - 位置 :fixed and margin:0 auto not working in IE

html - "badge-like"设计的反向 CSS 类型样式

javascript - IE10 : pointer-events: none still trigger the element

jquery - jqplot 不适用于动态数据

javascript - 使用特定页面 url 提交 Webform