Team:Baskent Meds/Gallery
From 2013.igem.org
(Difference between revisions)
Line 259: | Line 259: | ||
</div> | </div> | ||
<div id="osmanbeykadesim" class="style2" style="position: absolute; right:15;z-index:1; overflow: visible;"><br> | <div id="osmanbeykadesim" class="style2" style="position: absolute; right:15;z-index:1; overflow: visible;"><br> | ||
- | < | + | <!--slidercontrols--> |
- | + | <button href="#left" class="buttonstu" data-liquidslider-ref="main-slider">left</button> | |
+ | <button href="#right" class="buttonstu" data-liquidslider-ref="main-slider">right</button> | ||
+ | <button class="btn">stop</button> | ||
</div> | </div> | ||
<!-- Feel free to load scripts in the footer --> | <!-- Feel free to load scripts in the footer --> | ||
Line 268: | Line 270: | ||
<script> | <script> | ||
$('#main-slider').liquidSlider( {pauseOnHover: true}); | $('#main-slider').liquidSlider( {pauseOnHover: true}); | ||
+ | |||
+ | $('.btn').on('click', function() { | ||
+ | var api = $.data( $('#main-slider')[0], 'liquidSlider'), | ||
+ | text = $(this).text() === 'Start' ? 'Stop' : 'Start'; | ||
+ | if (text === 'Stop') | ||
+ | api.startAutoSlide(); | ||
+ | else | ||
+ | api.stopAutoSlide(); | ||
+ | $(this).text(text); | ||
+ | }); | ||
/* If you need to access the internal property or methods, use this: | /* If you need to access the internal property or methods, use this: |
Revision as of 20:33, 6 September 2013