In YUI, there are the methods onContentReady()
and onAvailable()
. unfortunately there is no equivalent to that in jQuery. However there is a plugin that was inspired by them:
http://www.thunderguy.com/semicolon/2007/08/14/elementready-jquery-plugin/
This should allow you to bind the events to the anchor before the DOM is fully loaded.