javascript - Is it possible to wildcard for an attribute name with a wildcarded attribute? -
i have [src*=example]
selects html elements 'src' attribute containing 'example'. possible target attributes, pretty resulting in wildcarding attributes?
more or less, [(any attribute)*=example]
find elements attribute containing 'example'.
thanks in advance!
no. there's no such selector in css date!
using jquery:
$('*').filter(function(){ var selector = this; return $.grep(selector.attributes, function(attr) { return attr.value.indexof('example') !==-1 }).length > 0; }).css('color','red');
Comments
Post a Comment