this code below selects all the given children from the parent.
$(this).parent().find(this.attr("tagName").toLowerCase())
however, i dont know how to traverse upwards with the parent(). i would require a function that would automatically keep adding .parent() each time the function is called.
For example, i call function once and it returns
$(this).parent().find(this.attr("tagName").toLowerCase())
I call the function for second time again and it returns
$(this).parent().parent().find(this.attr("tagName").toLowerCase())
Third time,
$(this).parent().parent().parent().find(this.attr("tagName").toLowerCase())