foundation / foundation-sites

The most advanced responsive front-end framework in the world. Quickly create prototypes and production code for sites that work on any kind of device.
https://get.foundation
MIT License
29.66k stars 5.49k forks source link

Orbit is not working, What am i doing wrong?! #2946

Closed Jessemiel closed 11 years ago

Jessemiel commented 11 years ago

When i follow the docs for orbit in Zurb foundation, My browser shows nothing. It's Blank.

Here's my code: 1

mhayes commented 11 years ago

It looks like jQuery is being included twice. You'll want to change this from:

<script>
  document.write('<script src=' +
  ('__proto__' in {} ? 'js/vendor/zepto' : 'js/vendor/jquery') +
  '.js><\/script>')
</script>

<script src="js/foundation.min.js"></script>
<script src="js/vendor/jquery.js"></script>

to:

<script>
  document.write('<script src=' +
  ('__proto__' in {} ? 'js/vendor/zepto' : 'js/vendor/jquery') +
  '.js><\/script>')
</script>

<script src="js/foundation.min.js"></script>

Also you can simplify your HTML markup for Orbit by changing:

<div class="orbit-container">
  <ul class="orbit-slides-container" data-orbit>
    <li><img src="img/banner.jpg" /></li>
    <li><img src="img/banner2.jpg" /></li>
  </ul>
</div>

to:

<ul data-orbit>
  <li><img src="img/banner.jpg" /></li>
  <li><img src="img/banner2.jpg" /></li>
</ul>

Happy coding!