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
This happens for me too.
I think the problem is that you have to hold your mouse still when clicking the button, or it will not work.
For example, try clicking the button while moving your mouse at a slow, steady pace. The button won't work unless the mouse is barely moving. Also try dragging the button even just one pixel, then releasing.
The site you came across that works seems to use mousedown
to avoid this problem. They are also using an older version of jQuery UI, which might be a factor.
$( "#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;
}
}