I am using jquery’s ajax loading function to load an external html. The external html is using jquery and a jquery plugin called flexslider (an image gallery). The documentation says to load the flexslider with:
<script type="text/javascript" charset="utf-8">
$(window).load(function() {
$('.flexslider').flexslider({
slideshow: true, slideshowSpeed: 7000, animationDuration: 600, pauseOnAction: true, pauseOnHover: false});
});
</script>
When I call this it does not work. I tried doing this on the parent page but it did not seem to work either. I also made sure to load the external html before I initialized flexslider. Is there another event I should use on the parent page instead of
$(window).load(function(){});
do not use
$(window).load(function(){});use
$(document).ready(function(){});OR
instead
see the demo