jQuery - select multiple classes including object -


my html looks like:

<div class="class1 class2">text</div> 

the related jquery select:

var obj$ = $('.class1'); 

how select .class2 part of object obj$ without repeating $('.class1.class2')? far understand obj$.find('.class2') should not work find() not includes obj$?

thanks.

you can use .filter() subset of matched elements, e.g.

var $foo = $('.class1'); $foo.filter('.class2').css( 'color', 'blue' ); 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -