<link rel="import" href="../bower_components/polymer/polymer.html">

<script src="../bower_components/SimpleSlider/dist/simpleslider.min.js"></script>

<polymer-element name="simple-slider" constructor="SimpleSliderElement" attributes="transition-property transition-duration transition-delay start-value visible-value end-value auto-play">

  <script>

    var options = {};
    var element;

    options.created = function () {

        element = new window.SimpleSlider(this, {
          transitionProperty: this['transition-property'],
          transitionDuration: this['transition-duration'],
          transitionDelay: this['transition-delay'],
          startValue: this['start-value'],
          visibleValue: this['visible-value'],
          endValue: this['end-value'],
          autoPlay: this['auto-play']
        });

    };

    // Dispose slider on element detach
    options.detached = function () {
        element.dispose();
    };

    // Define slider methods on polymer element
    options.actualIndex = function() { return element.actualIndex; };
    options.change = function(index) { element.change(index); };
    options.next = function() { element.next(); };
    options.prev = function() { element.prev(); };
    options.prevIndex = function() { return element.prevIndex(); };
    options.nextIndex = function() { return element.nextIndex(); };
    options.dispose = function() { element.dispose(); };

    Polymer('simple-slider', options);

  </script>

</polymer-element>


<link rel="import" href="../../polymer/polymer.html">

<script src="../../SimpleSlider/dist/simpleslider.min.js"></script>

<polymer-element name="simple-slider" constructor="SimpleSliderElement" attributes="transition-property transition-duration transition-delay start-value visible-value end-value auto-play">

  <script>

    var options = {};
    var element;

    options.created = function () {

        element = new window.SimpleSlider(this, {
          transitionProperty: this['transition-property'],
          transitionDuration: this['transition-duration'],
          transitionDelay: this['transition-delay'],
          startValue: this['start-value'],
          visibleValue: this['visible-value'],
          endValue: this['end-value'],
          autoPlay: this['auto-play']
        });

    };

    // Dispose slider on element detach
    options.detached = function () {
        element.dispose();
    };

    // Define slider methods on polymer element
    options.actualIndex = function() { return element.actualIndex; };
    options.change = function(index) { element.change(index); };
    options.next = function() { element.next(); };
    options.prev = function() { element.prev(); };
    options.prevIndex = function() { return element.prevIndex(); };
    options.nextIndex = function() { return element.nextIndex(); };
    options.dispose = function() { element.dispose(); };

    Polymer('simple-slider', options);

  </script>

</polymer-element>


Use paths to polymer/SimpleSlider without bower_components
Use paths to polymer/SimpleSlider without bower_components
