Is it possible with Javascript to get the DOM element surrounding my script tag?
Example:
<div>
<script>
// get the DOM element of the surrounding <div> tag here
</script>
</div>
I won't/can't use id's or something similar on the div, because they would have to be randomly generated to be unique. I'm looking for a clean approach. There could be any number of these DIV's with Javascript inside.