I have a page where in a div HTMl is loaded from another page. In the parent page, I have javascript which has elements that apply to the dynamic content (such as mouseover animate, etc.). I have been trying to make it work for quite a few hours now but it just won't work. No JS errors in the Chrome developer tools. Can anyone help?
For example on the parent page's javascript I have:
jQuery("ul#nav li.page a").on('mouseover', '.item', function () {
jQuery(this).stop(true, true).animate({
backgroundPosition: "(0 0)"
}, 500);
jQuery(this).animate({
backgroundPosition: "(0 -35px)"
}, 750);
}, function () {
jQuery(this).animate({
backgroundPosition: "(0 -120px)"
}, 750)
});
and the 'child' page where HTML is loaded from
<li class="page"><a href="home" style="margin:0 22px 0 0" class="item">Home</a></li>
<li class="page"><a href="about" class="item">About Us</a></li>
<li class="page"><a href="store" class="item">Store</a></li>
<li class="page"><a href="news" class="item">News</a></li>
<li class="page"><a href="contact" style="margin:0 0 0 22px" class="item">Contact</a></li>
Your help would be greatly appreciated!
thisin your code?