JSFiddle - React, Tailwind, and code Playground

by yoowordpress

HTML

<script src="http://www.360slider.com/js/threesixty.js"></script>
http://jsfiddle.net/#run<div class="threesixty car">
    <div class="spinner">
        <span>0%</span>
    </div>
    <ol class="threesixty_images"></ol>
</div>

CSS

.threesixty {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}
.threesixty .threesixty_images {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}
.threesixty .threesixty_images img {
  position: absolute;
  top: 0;
  width: 100%;
  height: auto;
}
.threesixty .threesixty_images img.previous-image {
  visibility: hidden;
  width: 0;
}
.threesixty .threesixty_images img.current-image {
  visibility: visible;
  width: 100%;
}
.threesixty .spinner {
  width: 60px;
  display: block;
  margin: 0 auto;
  height: 30px;
  background: #333;
  background: rgba(0, 0, 0, 0.7);
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
}
.threesixty .spinner span {
  font-family: Arial, "MS Trebuchet", sans-serif;
  font-size: 12px;
  font-weight: bolder;
  color: #FFF;
  text-align: center;
  line-height: 30px;
  display: block;
}
.threesixty .nav_bar {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 11;
}
.threesixty .nav_bar a {
  display: block;
  width: 32px;
  height: 32px;
  float: left;
  background: url(/assets/sprites.png) no-repeat;
  text-indent: -99999px;
}
.threesixty .nav_bar a.nav_bar_play {
  background-position: 0 0 !important;
}
.threesixty .nav_bar a.nav_bar_previous {
  background-position: 0 -73px !important;
}
.threesixty .nav_bar a.nav_bar_stop {
  background-position: 0 -37px !important;
}
.threesixty .nav_bar a.nav_bar_next {
  background-position: 0 -104px !important;
}
/* html */
.threesixty:-webkit-full-screen {
  background: #ffffff;
  width: 100%;
  height: 100%;
  margin-top: 0;
  padding-top: 200px;
}
.threesixty:-moz-full-screen {
  background: #ffffff;
  width: 100%;
  height: 100%;
  margin-top: 0;
  padding-top: 200px;
}

JavaScript

window.onload = init;

var car;
function init(){

    car = $('.car').ThreeSixty({
        totalFrames: 52, // Total no. of image you have for 360 slider
        endFrame: 52, // 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/car/', // path of the image assets
        //filePrefix: '', // file prefix if any
        //ext: '.png', // extention for the assets
         imgArray: [
        'http://www.mathieusavard.info/threesixty/1.jpg',
        'http://www.mathieusavard.info/threesixty/2.jpg',
        'http://www.mathieusavard.info/threesixty/3.jpg',
        'http://www.mathieusavard.info/threesixty/4.jpg',
        'http://www.mathieusavard.info/threesixty/5.jpg',
        'http://www.mathieusavard.info/threesixty/6.jpg',
        'http://www.mathieusavard.info/threesixty/7.jpg',
        'http://www.mathieusavard.info/threesixty/8.jpg',
        'http://www.mathieusavard.info/threesixty/9.jpg',
        'http://www.mathieusavard.info/threesixty/10.jpg',
        'http://www.mathieusavard.info/threesixty/11.jpg',
        'http://www.mathieusavard.info/threesixty/12.jpg',
        'http://www.mathieusavard.info/threesixty/13.jpg',
        'http://www.mathieusavard.info/threesixty/14.jpg',
        'http://www.mathieusavard.info/threesixty/15.jpg',
        'http://www.mathieusavard.info/threesixty/16.jpg',
        'http://www.mathieusavard.info/threesixty/17.jpg',
        'http://www.mathieusavard.info/threesixty/18.jpg',
        'http://www.mathieusavard.info/threesixty/19.jpg',
        'http://www.mathieusavard.info/threesixty/20.jpg',
        'http://www.mathieusavard.info/threesixty/21.jpg',
        'http://www.mathieusavard.info/threesixty/22.jpg',
        'http://www.mathieusavard.info/threesixty/23.jpg',
       ...