SyntaxFix
Write A Post
Hire A Developer
Questions
A faster way is to use javascript directly, eg.
var parent = $(innerdiv.get(0).parentNode.parentNode.parentNode);
This runs significantly faster on my browser than chaining jQuery .parent() calls.
.parent()
See: http://jsperf.com/jquery-get-3rd-level-parent