I'm loading my page using the load function. The page contains initialization code for the orbit slider (Im using foundation).The images load but the slider does not initialize.
Code to load the slider.html
$("a#1").click( function () {
$("#center_content").load("pages/slider.html");
});
Code in slider.html
<div class="row">
<div class="four columns">Welcome</div>
<div class="eight columns" id="featured">
<img src="images/slides/1.jpg" alt="Overflow: Hidden No More" />
<img src="images/slides/2.jpg" alt="HTML Captions" />
<img src="images/slides/3.jpg" alt="and more features" />
<img src="images/slides/1.jpg" alt="Overflow: Hidden No More" />
<img src="images/slides/2.jpg" alt="HTML Captions" />
<img src="images/slides/3.jpg" alt="and more features" />
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('#featured').orbit();
});
</script>