How can I get my script to run after all .load() events?
I have a simple script I developed, with help from a tutorial on jqueryfordesigners.com, which changes the class on a floating sidebar element in order to change it's positioning code depending on how far the document has scrolled. An example of it in practice is below. The sidebar stays within the window but will be bumped up when you scroll all the way to the footer:
However, this solution depends on being able to calculate the height of the parent element of the sidebar, in the DOM, and in the final page there are
a number of other scripts for other functions, which use load() commands to extend elements of the document as it loads (EDIT: I don't actually know how they work; they are disqus functions which load the disqus comment system elements and I don't know how to modify them). As a result, my script does not seem to calculate the height of it's containing element correctly. So, I'm looking for a way to make my script load after
all load() commands the disqus scripts have executed. An example of the final implementation is here, though it is still a mockup page:
Click around to some of the other pages on this blog to see how the problem is also not totally consistent.
Anyway it seems like something that should be simple to fix but I'm a total newbie and don't know the right approach to take. I would very much appreciate if someone can indicate exactly the commands and syntax necessary.
Thanks,
Lu