I am a beginner so bear with me.
So I am trying to dynamically load this javascript easy slider into a div on my index page like this ...
switch($_GET['page']) {
case '#YELLOW' :
$page = '
<div id="slider">
<ul>
<li><a href=""><img src="http://localhost/easy/archive/YELLOW/images/1.jpg" alt="" /></a></li>
<li><a href=""><img src="http://localhost/easy/archive/YELLOW/images/2.jpg" alt="" /></a></li>
<li><a href=""><img src="http://localhost/easy/archive/YELLOW/images/3.jpg" alt="" /></a></li>
</ul>
</div>
';
<script type="text/javascript">
$(document).ready(function(){
$("#slider").easySlider();
});
</script>is
break;
But it only actually loads ever second time I click the link. What is going on here. Do I need to evaluate the javscript code? What would that mean here? Am I loading the javascript in at the wrong point? Why does it only break every couple times?
Thanks in advance
onload
function ?