jQuery - select subset of elements within a saved set of elements

后端 未结 5 1560
闹比i
闹比i 2020-12-11 04:26

From this:

var $saved = $(\'#parent\').find(\'a\');

How can I now subselect those elements in $saved which have class my

5条回答
  •  渐次进展
    2020-12-11 05:32

    may be this one can help

    var $refined = $saved.filter('.myClass');
    

    http://api.jquery.com/filter/

提交回复
热议问题