javascript - jquery slider click event gives value that is one greater than on slide -


i created jquery slider , reason or slider has been returning values +-1 desired value. of right now, when click on timeline gives me 1 value greater clicked.

i've been trying correct value when "change" hit "change" hit dragging square sliding thing (lack of better term) , when click animate, custom event.

is there other way can check when user clicks on point on timeline? or has had error similar slider values off 1?

el.slider({     min: 0,     max: 24,     step: 1,     value: 17,     create: function() {         _this.updateselectorvalue(el, true);     },     change: function( event, ui ) {         debugger;         _this.updateselectorvalue(el);     },     start: function( event, ui ) {         _this.updateselectorvalue(el);     },     stop: function( event, ui ) {         _this.updateselectorvalue(el);     },     slide: function( event, ui ) {         _this.showvalueinhandle(el, ui);     } }); updateselectorvalue: function(e, i) {     //debugger;     var init = (typeof === "undefined") ? false : i;     var value = e.slider("option","value");     e.find(".ui-slider-handle")       .addclass("btn btn-primary")       .text(app.commonfunctionscontroller.formattimestring(value, false));     if (init) {         $('.btn.btn-primary.pm-peak').click();         $('.btn-pm-peak').addclass('focus');     } else {         $('.btn.btn-primary.custom').click();         $('.btn-custom').addclass('focus');     }     this._context.set('currentvalue', value); }, 


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -