(6)
1
Wersja: 2.0.4
Numer wersji wtyczki
Dokumentacja
Sprawdź wszystkie opcje jakie oferuje plugin
Strona wtyczki
Oficjalna witryna wtyczki
Github
Repozytorium Github
Wersja jQuery: jquery *
Wersja jQuery z którą współpracuje plugin
Licencja: MIT
Licencja
Zobacz więcej
Mała i szybka biblioteka jQuery ulepszająca element slidera HTML5 input typu range.
Wspiera wszystkie popularne przeglądarki w tym IE8+. Posiada również wsparcie dla dotyku oraz jest responsywna.
Tagi
Instalacja
  • Biblioteki
  • CSS
  • HTML
  • JS
<link href="rangeslider.css" rel="stylesheet" />

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="rangeslider.min.js"></script>
.rangeslider__fill {
  background: #00ffb2;
}

output {
  display: block;
  text-align: center;
  font-size: 50px;
  margin-top: 25px;
}
<input 
	type="range"
	min="10"     
	max="1000"
	step="10"
	value="300"
	data-orientation="horizontal" 
>

<output></output>
updateVal = function(value){
	$('output').val(value);
};

var $el = $('input[type=range]');

$el.rangeslider({

    // Feature detection the default is `true`.
    // Set this to `false` if you want to use
    // the polyfill also in Browsers which support
    // the native <input type="range"> element.
    polyfill: false,

    // Default CSS classes
    rangeClass: 'rangeslider',
    disabledClass: 'rangeslider--disabled',
    horizontalClass: 'rangeslider--horizontal',
    verticalClass: 'rangeslider--vertical',
    fillClass: 'rangeslider__fill',
    handleClass: 'rangeslider__handle',

    // Callback function
    onInit: function() {
    	updateVal($el.val());
    },

    // Callback function
    onSlide: function(position, value) {
    	updateVal(value);
    },

    // Callback function
    onSlideEnd: function(position, value) {}
});
Demo
Pobierz demo
lub zobacz wersję on-line
mobile