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

Popular posts from this blog

javascript - ScrollTo Effect (href to div) -

javascript - ng-class not responding to change in model in Angular? -

javascript - document.registerElement extending HTMLInputElement prototype while using custom tag name to avoid implicit browser style -