jQuery UI — buttonset buttons don't always work on first click

后端 未结 2 1211
不思量自难忘°
不思量自难忘° 2021-02-19 22:18

I am using a jQuery UI buttonset (based on a few radio buttons.) Everything works pretty fine except sometimes when you click on one of the buttons nothing happens (just as if y

2条回答
  •  没有蜡笔的小新
    2021-02-19 22:45

     $( "#radio" ).buttonset();
     $( "#radio" ).find("label").unbind("mouseup");
    

    because in jquery source code there is:

    .bind( "mouseup" + this.eventNamespace, function( event ) {
      if ( options.disabled ) {return; }
      if ( startXPos !== event.pageX || startYPos !== event.pageY ) {
                        clickDragged = true;
       }
    }
    

提交回复
热议问题