我试图使用范围控制来捕获0到10的分数。如果没有与范围控制进行任何交互,则需要禁用“下一步”按钮。这在chrome中工作正常,但是在IE 11中,更改范围值时未调用以下代码。该如何解决?
$( 'input[type="range"]' ).on( 'input', function () {
var control = $( this ),
controlMin = control.attr( 'min' ),
controlMax = control.attr( 'max' ),
controlVal = control.val(),
controlThumbWidth = control.data( 'thumbwidth' );
var range = controlMax - controlMin;
var position = ( ( controlVal - controlMin ) / range ) * 100;
var positionOffset = Math.round( controlThumbWidth * position / 100 ) - ( controlThumbWidth / 2 );
var output = control.next( 'output' );
output
.css( 'left', 'calc(' + position + '% - ' + positionOffset + 'px)' )
.text( controlVal );
$( this ).attr( "data-modified", "1" );
$( "#next" ).removeAttr( "disabled" );
} );