Let say there is a html element like
How can I find and assign the "h2" element to a variable?
I need something like
var node = document.getParentElementByPattern("dummyunique");
If jQuery helps I can use this library. However
var node = $("h2:contains('dummyunique')");
does not work either
So how else can I assign it?