1

my Javascript of Foundation is not working. I think my initialization is wrong. Can anyone help me?

var jQ = $.noConflict();
jQ(document).foundation();

jQ(document).ready(function($){
    var orbit = new Foundation.Orbit($('#slider'), {animation: 'fade',
        timerDelay: 8000,
        pauseOnHover: true,
        navButtons: false,
        bullets: false
    });
});

2 Answers 2

1

Note that you shouldn't set it through JS like this but rather in your HTML in the data-options, more info.

Example:

<div class="orbit" role="region" data-orbit data-options="timerDelay:5000; pauseOnHover:true;navButtons:false;bullets:false;">
...
</div>

You can find specific information for Foundation 6 here: http://foundation.zurb.com/sites/docs/orbit.html

Sign up to request clarification or add additional context in comments.

3 Comments

yes. I have the right html, but i want to change the settings because i have different sliders on the page
Hi Thanks, But nothing changed. There are still buttons and navButtons. Because I have $.noConflict(). Could that be the error there?
Okay. Here is it. It´s for an ebaytheme. The javascript is loading asynchron. jsbin.com/cadazuvosi/edit?html,css,js,output
0

That´s my code. No Change :/

<div id="slider" class="orbit" role="region" data-options="navButtons:false; autoPlay:false" data-orbit>
    <ul class="orbit-container">

        <li class="orbit-slide is-active">
            <img src="http://placehold.it/2000x750&text=1st">
        </li>
        <li class="orbit-slide">
            <img src="http://placehold.it/2000x750&text=2nd">
        </li>
        <li class="orbit-slide">
            <img src="http://placehold.it/2000x750&text=3nd">
        </li>
        <li class="orbit-slide">
            <img src="http://placehold.it/2000x750&text=4nd">
        </li>
    </ul>
</div>

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.