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

前端 未结 4 1350
迷失自我
迷失自我 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:43

    Until the jquery-ui team solves this problem, I made changes to jquery-ui lib. I've changed these 9 'slide' to 'superslide'

    > grep -noE '(\W+)slide(\W+)' jquery-ui-1.8.14.custom.min.js
    287::"slide",
    299:="slide";
    .slide(
    301::{slide:
    303:.slide(
    417::"slide",
    427:("slide",
    ("slide",
    773:.slide=
    

    and then use .superslide instead .slide in your js-code on the page which have both mootools and jquery. For ex:

    jQuery( "#slider" ).slider({
        range: "min",
        min: 5000,
        max: 1000000,
        value: 300000,
            ... 
        superslide: function( event, ui ) {
            ...
        }
    });
    

    Hope, this helps.

提交回复
热议问题