I have a situation where I would like to find the parent element of the current element, and I'd like to do so without cluttering up my code with an ID for every element that I need to find.
For instance, say I have the following:
<div>
<a href="javascript: SomeFunction();">Link Text</a>
<div>
I want the function that is called to find the parent <div> element without giving the parent div and ID and without needing to give the <a> element an ID
I've tried passing "this" to the function, but that gets me no where.
What would I pass to the function and then how would I locate the parent div with that information.
If this isn't clear enough, please let me know an I will supply more information if I can.
Start Free Trial