jQuery seems to ignore content from .load
I successfully load some content at the beginning of a document.ready script with:
- $('#leftColumnContent').load(contentToLoad);
What works: rollovers on content that didn't use .load:
- $('img#mainNavNews').hover(function () {
- this.src = 'images/nav/news_dn.png';
- }, function () {
- this.src = 'images/nav/news_up.png';
- });
- $('#leftColumnContent').load(contentToLoad);
-
- $('img#mainNavNews').hover(function () {
- this.src = 'images/nav/news_dn.png';
- }, function () {
- this.src = 'images/nav/news_up.png';
- });
What doesn't work: the same rollover code in the same script that points to unique elements from the .load content. Unless I put the script at the end of the .load content.
What am I missing here? I'd like to keep all the code in one script. ( I attached the complete script. )
Thanks!
Lee