Find a Javascript parent node that matches a certain string

Here’s a small bit of javascript that I use in my Sencha Touch projects to find a parent with an id that matches a string. function findParentNodeRegex(regex, childObj) { var testObj = childObj; var count = 1; while(! { //console.log(‘My name is ‘ + + ‘. Let\’s try moving up one level to see […]