JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://getfirebug.com/firebug-lite-debug.js"></script>
<h1>hello1</h1>
<div class='hh'>aWeSome tExt</div>
<h1>hello2</h1>
<h1>hello3</h1>
JavaScript
// An implementation of a case-insensitive contains pseudo
// made for all versions of jQuery
(function( $ ) {
$.expr[':'].eqXYZ = $.expr.createPseudo(function( text ) {
return function( elem ) {
//console.log(elem.nodeName);
return true;
};
});
$.expr[':'].esXYZ = $.expr.createPseudo(function( text ) {
return function( elem ) {
//console.log(elem.nodeName);
return true;
};
});
})( jQuery );
// This one goes through all the elements in the DOM???
// Apparently any custom pseudo function that starts with "eq"
// has this problem!!!
console.log( jQuery(".hh:eqXYZ(blah)") );
// This one works (doesn't start with eq)
console.log( jQuery(".hh:esXYZ(blah)") );