2016-04-05 22 views

cevap

0

geçerli:

http://jsfiddle.net/LP5XA/4/

HTML:

<div id="slider"></div> 

CSS:

#slider 
{ 
    background-color:red; 
    background-position:left; 
    background-repeat:no-repeat; 
    background-size:10px; 
} 

JavaScript:

$(function() { 
    $("#slider").slider(
    { 
     slide:function(event, ui){ 
      //This is what the original code for this example looks like. 
      //It's for changing the white/red area when the slider moves. 
      //var w = $(ui.handle).css("left"); 
      //$(this).css("background-size",w); 

      //Notice how when you set the "w" value to a static value it 
      //will keep the white/red space static as well? So you can 
      //change the colored space with whatever logic you want to use. 
      $(this).css("background-size",50); 
     } 
    }); 
}); 

Do arka planda genişliğini ve rengini değiştirerek içeren yapmak istediğini. Örneğinizdeki web sitesi, kiralama ve satın alma arasındaki eşik üzerinde yapılan ve bir diğeri üzerinde ideal hale geldiğinde yapılan bir hesaplamayı temel alıyor gibi görünüyor.

+0

Bu kütüphaneye dayanarak aynısını yapabilir miyiz? Http: //ionden.com/a/plugins/ion.rangeSlider/demo_advanced.html – user2952092

İlgili konular