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 - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -