css - Jquery ui slider background and borders -
i'm trying achieve on image below using css,

i made use of slider , modified it. http://jqueryui.com/slider/#steps
what css values should need change same output image above?
here's code:
var valmap = [1, 2, 3, 4, 5, 6,7,8,9]; value= 0; var lastslidevalue = 0; var internalslidecalling = false; var slider = $("#slider").slider({ disabled : false, animate : true, min : 0, max : valmap.length - 1, slide : function(event, ui) { slider.slider("option", "animate", "slow"); }, change: function(){ var slideval = $(this).slider('value'); if (!internalslidecalling) { if (slideval>lastslidevalue && lastslidevalue < $(this).slider('option','max')) { slideval = lastslidevalue+1; } else if (lastslidevalue > $(this).slider('option','min')) { slideval = lastslidevalue-1; } lastslidevalue = slideval; } console.log(slideval, value) if(value < slideval) { console.log("incremented") } else if(value > slideval){ console.log("decremented") } value = slideval; if (!internalslidecalling){ internalslidecalling = true; $(this).slider('value',slideval); } else internalslidecalling = false; } }); $("#slider").slider('values',valmap); here's jsfiddle: http://jsfiddle.net/endl3ss/fvj78/
just make u understand start have made example have look
body{ background:#000; } .ui-slider-handle, .ui-state-hover, .ui-state-default{ height: 20px important; width: 20px; background: orange !important; border-radius: 0; top: 0 !important; border:0 !important; } .ui-slider{ border-radius: 0; height: 21px !important; background: #000; border-color :#fff !important; }
Comments
Post a Comment