开发者

Jquery OnChange event not firing

$('.minSimiTrack').Slider({
   accept : '.minSimiHandle', fractions : 30,
     onSlide : function( cordx, cordy, x , y){
     $("#wrapperMinSimi").css("background-position", ((cordx))+"px 0px");
    .....},
      onChange : function(){
    $('#submitResetFooter').show(); 
  开发者_如何学编程  },
    .....

 HTML markup
       <div id="wrapperMinSimi">
   <div class="minSimiTrack"><div class="minSimiHandle"></div></div>    
   </div>

I don't know why onChange not working....


If you are using jQuery UI, the on slide and on change events are "slide" and "change" respectively. i.e.

$( ".selector" ).slider({
   change: function(event, ui) { ... }
});

From here

http://jqueryui.com/demos/slider/#event-slide


I assume this is using jQuery UI slider? In which case your initial call has an erroneous capital S, and the event names are wrong.

$('.minSimiTrack').slider({
    accept : '.minSimiHandle', 
    fractions : 30,
    slide : function( cordx, cordy, x , y){
        $("#wrapperMinSimi").css("background-position", ((cordx))+"px 0px");
        .....
    },
    change : function(){
        $('#submitResetFooter').show(); 
    },
    .....
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜