jQuery UI Slider Labels Under Slider

前端 未结 5 1305
一整个雨季
一整个雨季 2020-11-29 03:16

I am limited to using jQuery 1.4.2 and jQuery ui 1.8.5 (this is not by choice, please do not ask me to upgrade to latest versions). I have created a slider that shows the cu

5条回答
  •  青春惊慌失措
    2020-11-29 04:00

    I have a simple solution for a slider with labels using only jquery.

    You simply set up your div where you want the slider to go

    Then call the setup method which will add the labels to the slider at the relevant indexes.

    // setupSlider(divId, labelArray, initialIndex);
    setupSlider('mySlider3', ["label1", "label2", "label3", "label3"], 3);
    

    see the code pen below for full code

    https://codepen.io/larnott/pen/WNeErqE

提交回复
热议问题