mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
default emptry string val to 0 on refresh Fixes #3029
This commit is contained in:
parent
5f6ce0d651
commit
cbaa42d63c
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue