bliss
bliss copied to clipboard
jQuery equivalent for find with contains
How to find a DOM node in Bliss which can be found in jQuery as:
jQuery('#menu-sidebar-menu li a:contains("Hello World!")')
You can't do that with a selector, Bliss only supports the same CSS selectors that the browser supports. So you'd have to loop over them, like this:
$$('#menu-sidebar-menu li a').filter(a => a.textContent.indexOf("Hello World!") > -1);