http://api.jquery.com/jQuery.inArray
Kôd:
$(
function() {
var select = ['foo', 'bar'];
$('li').filter(
function(i){
return $.inArray($(this).children('p').text(), select) >= 0;
}
).css('background-color', 'red');
}
);
__________________
Don't look at me; I'm lost too.
“If you can't dazzle them with brilliance, baffle them with bul*s**t.”
Poslednja izmena od Br@nkoR : 06. 06. 2012. u 18:10.
|