jQuery UI Slider moving upwards and disappearing in the div when used

前端 未结 4 1348
迷失自我
迷失自我 2021-01-24 05:19

I\'ve replaced a MooTools slider with a jQuery UI slider as our content management system uses jQuery and various other jQuery UI elements. I\'ve run into a problem where on Fir

4条回答
  •  不思量自难忘°
    2021-01-24 05:52

    This worked for me:

            // This fixed the conflict between slider and motools
            jQuery.ui.slider.prototype.widgetEventPrefix = 'slider';
    
            jQuery( "#slider-range" ).slider({
              range: true,
              min: 16,
              max: 99,
              values: [ 16, 99 ],
              slide: function( event, ui ) {
                jQuery( "#age_range" ).val( ui.values[ 0 ] + " - " + ui.values[ 1 ] );
              }
            });
    

提交回复
热议问题