Skip to content

Commit cbaa42d

Browse files
committed
default emptry string val to 0 on refresh Fixes jquery-archive#3029
1 parent 5f6ce0d commit cbaa42d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/jquery.mobile.forms.slider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ $.widget( "mobile.slider", $.mobile.widget, {
269269
percent = Math.round( ( ( data.pageX - this.slider.offset().left ) / this.slider.width() ) * 100 );
270270
} else {
271271
if ( val == null ) {
272-
val = cType === "input" ? parseFloat( control.val() ) : control[0].selectedIndex;
272+
val = cType === "input" ? parseFloat( control.val() || 0 ) : control[0].selectedIndex;
273273
}
274274
percent = ( parseFloat( val ) - min ) / ( max - min ) * 100;
275275
}

0 commit comments

Comments
 (0)