0

I'm not sure as to why my implementation is not working. I have followed the documentation on the foundation 4 site but can not figure out why it's not working. All that shows up are the cursor dots that change the position of the pictures in the Orbit. Also, I have the correct css/html/js folder paths.

Here's what my mark up looks like:

<!DOCTYPE html>
<!--[if IE 8]>         <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->

<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width" />
  <title> Foundation 4</title>

  <!-- If you are using CSS version, only link these 2 files, you may add app.css to use for your overrides if you like. -->
  <link rel="stylesheet" href="foundation-4/css/normalize.css" />
  <link rel="stylesheet" href="foundation-4/css/foundation.css" />

  <script src="foundation-4/js/vendor/custom.modernizr.js"></script>

</head>
<body>

  <!-- body content here -->

  <nav class="top-bar">
    <ul class="left">
        <li class="name"><font color="white"><a href="vm.php">Va</a></font></li>
    </ul>
    <ul class="right">
        <li class="name"><font color="white">Home</font></li>
    </ul>
  </nav>
  <br>

<!-- ======================== ORBIT===================== -->

<div class="orbit-container"> 
   <ul data-orbit="" class="orbit-slides-container">
    <li>
      <img src="3.jpg">
      <div class="orbit-caption">IMAGE 3</div>
    </li>
    <li class="active">
      <img src="1.jpg">
      <div class="orbit-caption">IMAGE 1</div>
    </li>
    <li>
      <img src="2.jpg">
      <div class="orbit-caption">IMAGE 2</div>
    </li>
    <li>
      <img src="3.jpg">
      <div class="orbit-caption">IMAGE 3</div>
    </li>
    <li>
      <img src="1.jpg">
      <div class="orbit-caption">IMAGE 1</div>
    </li>
  </ul>

  <!-- Prev/Next Arrows -->
  <a href="#" class="orbit-prev">Prev<span></span></a>
  <a href="#" class="orbit-next">Next<span></span></a>

  <!-- Slide Numbers -->
  <div class="orbit-slide-number">
    <span>1</span> of <span>3</span>
  </div>

  <!-- Timer and Play/Pause Button -->
  <div class="orbit-timer">
    <span></span>
    <div class="orbit-progress" style="width: 100%; -webkit-transition: width 10s linear;"></div>
  </div>

</div>

<!-- Orbit Bullet Slide Indicator -->
<ol class="orbit-bullets">
  <li data-orbit-slide-number="1"></li>
  <li data-orbit-slide-number="2" class="active"></li>
  <li data-orbit-slide-number="3"></li>
</ol>

<!-- =======ORBIT END======= -->


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

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

  <script src="js/foundation/foundation.js"></script>
  <script src="js/foundation/foundation.orbit.js"></script>
  <script src="js/foundation/foundation.alerts.js"></script>
  <script src="js/foundation/foundation.clearing.js"></script>
  <script src="js/foundation/foundation.cookie.js"></script>
  <script src="js/foundation/foundation.dropdown.js"></script>
  <script src="js/foundation/foundation.forms.js"></script>
  <script src="js/foundation/foundation.joyride.js"></script>
  <script src="js/foundation/foundation.magellan.js"></script>
  <script src="js/foundation/foundation.orbit.js"></script>
  <script src="js/foundation/foundation.placeholder.js"></script>
  <script src="js/foundation/foundation.reveal.js"></script>
  <script src="js/foundation/foundation.section.js"></script>
  <script src="js/foundation/foundation.tooltips.js"></script>
  <script src="js/foundation/foundation.topbar.js"></script>
  <script src="js/foundation/foundation.interchange.js"></script>
  <script>
    $(document).foundation();
  </script>


</body>
</html>

Also, here is a screen shot of the errors I am getting in google chrome.

http://s1228.photobucket.com/user/Ebadly/media/random/ScreenShot2013-11-15at112428AM_zpsdfc35907.png.html

Matt Stein
  • 3,053
  • 1
  • 19
  • 35
Ebad Saghar
  • 1,107
  • 2
  • 16
  • 41

2 Answers2

2

EDIT: THE FOUNDATION DOUMENTATION CONTAINS

<ul data-orbit="" class="orbit-slides-container">

REMOVE: ="" class="orbit-slides-container" It did the TRICK FOR ME: SO it becomes:

<ul data-orbit>

"Uncaught TypeError: Object # this is because jQuery has not loaded. Download jQuery from here http://jquery.com/download/

Link this jQuery file to your website

Even if the jQuery file is linked properly make sure it is loaded in the

<head></head> tags before loading the foundation javascript files

<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width" />
  <title> Foundation 4</title>

  <!-- If you are using CSS version, only link these 2 files, you may add app.css to use for your overrides if you like. -->
  <link rel="stylesheet" href="foundation-4/css/normalize.css" />
  <link rel="stylesheet" href="foundation-4/css/foundation.css" />

<script src="LINKTO JQUERY JS FILE"></script>
  <script src="foundation-4/js/vendor/custom.modernizr.js"></script>

</head>

EDIT:

<div class="row">
<div class="orbit-container"> 
   <ul data-orbit="" class="orbit-slides-container">
    <li>
      <img src="3.jpg">
      <div class="orbit-caption">IMAGE 3</div>
    </li>
    <li class="active">
      <img src="1.jpg">
      <div class="orbit-caption">IMAGE 1</div>
    </li>
    <li>
      <img src="2.jpg">
      <div class="orbit-caption">IMAGE 2</div>
    </li>
    <li>
      <img src="3.jpg">
      <div class="orbit-caption">IMAGE 3</div>
    </li>
    <li>
      <img src="1.jpg">
      <div class="orbit-caption">IMAGE 1</div>
    </li>
  </ul>
</div>
</div>

EDIT: TRY THIS

  <div class="large-12 columns">
            <div class="orbit-container">
                <ul data-orbit>
                    <li data-orbit-slide="headline-1">
                        <h2>Headline 1</h2>
                        <h3>Subheadline</h3>
                        <p>Pellentesque habitant morbi tristique senectus.</p>
                    </li>
                    <li data-orbit-slide="headline-2">
                        <h2>Headline 2</h2>
                        <h3>Subheadline</h3>
                        <p>Pellentesque habitant morbi tristique senectus.</p>
                    </li>

                </ul>

            </div>



        </div>
Dawood Awan
  • 7,051
  • 10
  • 56
  • 119
0

It's not going to work because there are AJAX calls being made to get the scripts.
You're going to have to use something like USBWebServer if you're going to develop/test locally.

kei
  • 20,157
  • 2
  • 35
  • 62