TypeError: $(...).slider is not a function

gintech picture gintech · Sep 25, 2014 · Viewed 65.5k times · Source

Is there someway jquery slider dependent on server? I am using jquery library and Ui for jquery range slider. There is only one jquery library so i think no question on any conflict. The slider works perfectly fine in my linux server which gives correct output. But when i pushed the code is my IIS server i am getting this error which says TypeError: $(...).slider is not a function in mozilla browser and Uncaught TypeError: undefined is not a function in chrome browser. I am just wandering if server is anyway be the cause for it. :( Please suggest if anyone face something similar.

$(document).ready(function() {
        $("#slider").slider({
          range: "min",
          animate: true,
          value:0,
          min: 0,
          max: 30,
          step: 1,
          slide: function(event, ui) {
            update(2,ui.value); //changed
          }
      });}

Answer

Waqas Bukhary picture Waqas Bukhary · Feb 14, 2016

Use both Jquery and ui, then it will work.

<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>