Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
default emptry string val to 0 on refresh Fixes #3029
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbender committed Dec 5, 2011
1 parent 5f6ce0d commit cbaa42d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/jquery.mobile.forms.slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ $.widget( "mobile.slider", $.mobile.widget, {
percent = Math.round( ( ( data.pageX - this.slider.offset().left ) / this.slider.width() ) * 100 );
} else {
if ( val == null ) {
val = cType === "input" ? parseFloat( control.val() ) : control[0].selectedIndex;
val = cType === "input" ? parseFloat( control.val() || 0 ) : control[0].selectedIndex;
}
percent = ( parseFloat( val ) - min ) / ( max - min ) * 100;
}
Expand Down

0 comments on commit cbaa42d

Please sign in to comment.