选择jQuery的元素

时间:2018-01-20 14:51:31

标签: jquery

我正在尝试定位以下内容:#Artwork > path:nth-child(10) 我怎样才能在jQuery中选择它,因为以下内容不起作用:

(function($) {

var clouds = $('#Artwork > path:nth-child(10)')
TweenLite.to(clouds, 1, {opacity:0, y:50});

})(jQuery);

HTML:

<path xmlns="http://www.w3.org/2000/svg" d="M2219,1043.65,1605.18,936.23c-143.54-25.13-502.39-25.13-645.93,0L449,1025.53V1231H2219Z" transform="translate(405)" style="fill: #030f33"/>

1 个答案:

答案 0 :(得分:-1)

尝试$(&#34;#Artwork&#34;)。find(&#34; path:nth-​​child(10)&#34;)