1

I've implemented the jQuery slider UI in the page below but it doesn't seem to be initialising.

Test Page

I loaded it up in Firebug and I got the following error:

$("#slider-range").slider is not a function
[Break On This Error]   

slide: function( event, ui ) {

1 Answer 1

2

You have not included the JQuery UI Library. Only included the jQuery is not enough.

You can use CDN to include the UI library.

  1. JQuery CDN:

    <script src="http://code.jquery.com/ui/1.8.18/jquery-ui.min.js" type="text/javascript"></script>
    
  2. Google CDN:

    <script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js' type='text/javascript'></script>
    

Include one of those, or, even better, read this Getting Started Docs.

UPDATES

You have to include the CSS files, to properly view the UI elements. Include the following CSS file

http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/ui-lightness/jquery-ui.css

See your slider in action here

Sign up to request clarification or add additional context in comments.

3 Comments

I've done it but its still not working - I've updated licf.ronaldboadi.com/test2.html
@CJS, You also have to include the UI CSS files, read the getting started I linked
@CJS, Check my update, I have included the css link to insert and also a demo of your working file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.