Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello I have Error in my code can.i am trying to sort product using price range but jQuery gives type error.
My jQuery function if=s below

XML
<script type="text/javascript">
$(function() {
debugger;
    $( "#slider-range" ).slider({
      range: true,
      min: 0,
      max: 1000,
      values: [ <?php echo $min; ?>, <?php echo $max; ?> ],
      slide: function( event, ui ) {
        $( "#amount" ).val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] );
      }
    });
    $( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) +
      " - $" + $( "#slider-range" ).slider( "values", 1 ) );
  });
</script>


In above code it gives me error like
VB
TypeError: $(...).slider is not a function

Please help to solve this
Posted
Comments
Afzaal Ahmad Zeeshan 3-Apr-15 2:04am    
Make sure jQuery and jQuery UI are included.

1 solution

It tells you that your jQuery wrapper does not have this function. Are you sure you included not only jQuery, but also "jquery-ui.js"? I guess not. Please see:
https://jqueryui.com/slider.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900