0
votes

I am trying to use Orbit, and Foundation 6, without success. The pictures appear stacked one on top of the other, and do not change. I get a Javascript Error message in the Error Console.

If I remove the references to Orbit, the javascript error message does not appear.

Timestamp: 18/07/2016 12:51:46 Error: TypeError: We're sorry, object is not a valid parameter. You must use a string representing the method you wish to invoke. Source File: http://lf/bower_components/foundation-sites/js/foundation.core.js Line: 284

The bottom of the page, where the js files are called, is

</script>
<!--<script src="js/vendor/jquery.js"></script>
<script src="js/foundation/foundation.js"></script>-->
<script src='bower_components/foundation-sites/js/foundation.core.js'></script>
<script src='bower_components/foundation-sites/js/foundation.orbit.js'></script>
<script>
    /*
    $(document).foundation();
    */   

    $(document).foundation({
        orbit: {
            animation: 'slide'

        }
    });
</script>

All the paths to the .js code are correct.

I am guessing that I have an incorrect version of something in there, but I don't know what.

Does anyone have any suggestions?

1

1 Answers

0
votes

Foundation 6 uses jquery and jquery(version).min or jquery.js should be the first script that you should refer.

Adding to that, I'm guess you did not go through the Foundation 6 Orbit Slider documentation's JavaScript Reference section.

It says:

The file foundation.orbit.js must be included in your JavaScript to use this plugin, along with foundation.core.js. This plugin also requires these utility libraries:

foundation.util.keyboard.js, foundation.util.motion.js, foundation.util.timerAndImageLoader.js and foundation.util.touch.js

So try referring these in your script space or use the foundation.min.js which will take care of all dependencies.

One more important thing, if you want to animate your slider, then you will have to install and include motion-ui references as mentioned in the Orbit Slider documentation's Using Animation section.