Domanda

I am trying to create an Orbit slider on my website, however, when I run the webpage in my web browser, where the Orbit Slider should be, I see:

$(window).load(function() { $("#featured").orbit(); }); 

I am guessing this is because the html document is not linked to the correct javascript files. The site is currently linked to jquery.js, foundation.min.js, and jquery.foundation.orbit.js. Are the wrong files linked to the html file or is there another problem?

The code for the slider's div is this:

<div id="featured">
    <img src="example_pics/example1.jpg />
    <img src="example_pics/example2.jpg />
    <img src="example_pics/example3.jpg />
</div>

and the actual javascript is this:

<script type="text/javascript">
   $(window).load(function() {
       $("#featured").orbit();
   });
</script>

Any help or tips are much appreciated

È stato utile?

Soluzione

<script src="js/jquery.min.js" type="text/javascript"></script>

<script src="js/jquery.orbit.min.js" type="text/javascript"></script>

<link rel="stylesheet" href="css/orbit.css">

see http://zurb.com/playground/orbit-jquery-image-slider

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top