开发者

How to target a variable's child with JQuery

How do I target post_ad_cloned's input child?

var post_ad = $('.duplicate_name'); 
var post_ad_cloned = post_ad.clone().removeClass('duplicate_name').appendTo('#sss').show();
$("po开发者_如何学运维st_ad_cloned input").css('color', 'red'); 


var post_ad = $('.duplicate_name'); 
var post_ad_cloned = post_ad.clone().removeClass('duplicate_name').appendTo('#sss').show();
$("input", post_ad_cloned).css('color', 'red'); 

or:

var post_ad = $('.duplicate_name'); 
var post_ad_cloned = post_ad.clone()
  .removeClass('duplicate_name')
  .appendTo('#sss')
  .show()
  .children('input')
    .css('color', 'red');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜