Skip to content

Basic Demo for threesixty plugin

Gaurav Jassal edited this page Aug 1, 2013 · 2 revisions

You need to include css and javascript file in your webpage. The plugin has dependency on jQuery so, jquery needs to be loaded before threesixty plugin.

Include CSS file

<head>
  <link rel="stylesheet" href="css/threesixty.css">
</head>

Include Javascript file

<script type="text/javascript" src='js/threesixty.js'></script>

HTML Snippet

<div class="threesixty" id="mythreesixty">
    <div class="spinner">
        <span>0%</span>
    </div>
    <ol class="threesixty_images"></ol>
</div>

Javascript

This can also be called on document ready or use window.onload. But make sure jQuery and Threesixty is already loaded on the page.

window.onload = init;

var product;
function init(){

    my360 = $('#mythreesixty').ThreeSixty({
        totalFrames: 72, // Total no. of image you have for 360 slider
        endFrame: 72, // end frame for the auto spin animation
        currentFrame: 1, // This the start frame for auto spin
        imgList: '.threesixty_images', // selector for image list
        progress: '.spinner', // selector to show the loading progress
        imagePath:'assets/product1/', // path of the image assets
        filePrefix: 'ipod-', // file prefix if any
        ext: '.jpg', // extention for the assets
        height: 265,
        width: 400,
        navigation: true,
        disableSpin: true // Default false
    });

}