Is there way to get true when match both selectors class and data attribute ?
Find matched dropdown e.g:
`<select class="type-featured" data-featured="normal">`
....
`<select class="type-featured" data-featured="classical">`
....
`<select class="type-featured" data-featured="modern">`
Find select, class equal to type-featured AND data-featured value equal to normal - here is code:
$('.style-wrapper').each( function() {
var $styles = $(this);
if ( $styles.parents().find('select').is('.type-featured, [data-featured=normal]') ) {
// do something here
}
});
I got TRUE whether select has type-featured class OR data-featured="normal", data-featured="classical", data-featured="modern"
Its seems to be TRUE if match any one selector.
Is possible to get my desired result using .is function? May be using anonymous function like :
.is( function() {
//here some logic to result
});