Start jQuery UI Slider From 10 -


i start jquery ui slider 10 , had set min value 10, starts zero.

my code is

_app.detailsdivinit = function() {         debugger;         $( ".slider" ).slider({         min: 10,         max: 60,         step: 1     })     .each(function() {         var opt = $(this).data().uislider.options;         debugger;         //get number of possible values         var vals = opt.max - opt.min;        // space out values       (var = 0; <= vals; i+=opt.step * 20) {         debugger;         var el = $('<label>'+(i + "-" + (i + opt.step*20) )+' <div class="tickmark"></div></label>').css('left',(i/vals*100)+'%');         $( ".slider" ).append(el);       }      }); 

i gave value 10 still starts zero, , don't know why.

not sure trying ranges though (there's 50 units min of 10 , max of 60, can't divide 3 20 sized blocks). anyhow, see if below closer looking - replace block below.

for (var = opt.min; <= vals; i+=opt.step * 20) {     debugger;     var el = $('<label>'+(i + "-" + math.min(i + opt.step*20, opt.max))+' <div class="tickmark"></div></label>').css('left',((i - opt.min)/vals*100)+'%');     $( ".slider" ).append(el); }  

Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -