adjusted change event handling to fire change event on the selected radio, as Dave suggested, and which matches the native triggering. Also, checkboxes change events appear consistent with native implementation. Fixes #1206

This commit is contained in:
scottjehl 2011-03-31 00:22:26 -04:00
parent 506d5050b1
commit 612192011b

View file

@ -102,8 +102,7 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
_updateAll: function(){
this._getInputSet().each(function(){
var dVal = $(this).jqmData("cacheVal");
if( dVal && dVal !== $(this).is(":checked") || this.inputtype === "checkbox" ){
if( $(this).is(":checked") || this.inputtype === "checkbox" ){
$(this).trigger("change");
}
})