开发者

Get each selector of a multi selector jQuery object as a string

If I pass a number of selectors to jQuery, how can I differentiate the selector of each of th开发者_运维问答ose selectors as separate strings? For example:

$('#selector-a, #selector-b, #selector-c').each(function(){
    console.log( $(this).selector ); // logs an empty string
});


$.each($('#selector-a, #selector-b, #selector-c').selector.split(','),
       function(index, value) {
           console.log(value);
       }
); 
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜