mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-12 08:33:09 +00:00
Merge remote branch 'origin/master'
This commit is contained in:
commit
6c63bc699b
2 changed files with 24 additions and 2 deletions
|
|
@ -125,7 +125,7 @@
|
|||
<code>
|
||||
<pre>
|
||||
$(document).bind('mobileinit',function(){
|
||||
$.mobile.selectmenu.prototype.options.nativemenu = true;
|
||||
$.mobile.selectmenu.prototype.options.nativeMenu = true;
|
||||
});
|
||||
</pre>
|
||||
</code>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,29 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
|
|||
if( $(this).parent().is('.ui-disabled') ){ return false; }
|
||||
},
|
||||
|
||||
"tap": function( event ){
|
||||
"touchmove": function( event ){
|
||||
var oe = event.originalEvent.touches[0];
|
||||
if( label.data("movestart") ){
|
||||
if( Math.abs( label.data("movestart")[0] - oe.pageX ) > 10 ||
|
||||
Math.abs( abel.data("movestart")[1] - oe.pageY ) > 10 ){
|
||||
label.data("moved", true);
|
||||
}
|
||||
}
|
||||
else{
|
||||
label.data("movestart", [ parseFloat( oe.pageX ), parseFloat( oe.pageY ) ]);
|
||||
}
|
||||
},
|
||||
|
||||
"touchend mouseup": function( event ){
|
||||
label.removeData("movestart");
|
||||
if( label.data("etype") && label.data("etype") !== event.type || label.data("moved") ){
|
||||
label.removeData("etype").removeData("moved");
|
||||
if( label.data("moved") ){
|
||||
label.removeData("moved");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
label.data( "etype", event.type );
|
||||
self._cacheVals();
|
||||
input.attr( "checked", inputtype === "radio" && true || !input.is( ":checked" ) );
|
||||
self._updateAll();
|
||||
|
|
|
|||
Loading…
Reference in a new issue