Is there a way by which you can use multiple selectors with common tag name.
So like, here i have $('span.clone1, span.clone2, span.clone3')
i just want to make it common.
Than开发者_StackOverflow社区ks
Here's one way:
var myclasses = [ '.clone1', '.clone2', '.clone3', '.somethingelse' ];
$('span').filter( myclasses.join(',') );
$('input:text').filter( myclasses.join(',') );
If I understand your question something like this would work:
$("span[class^='clone']").blah()
精彩评论