1

Simple jQuery UI functions, such as the following:

(function($) {
    $('ui').sortable();
})(jQuery);

Result in an error which would normally indicate jQuery UI was not present.

Uncaught TypeError: Object [object Object] has no method 'sortable'

However, Chrome's developer tools confirms that it has been loaded. What's up?

1
  • What do you think of removing UI from the title? So it becomes a perfect target for duplicates. Every single day there's someone posting "my jSomething is not working" ;) Commented Oct 25, 2013 at 20:18

1 Answer 1

2

The answer was simply to stop using jQuery shorthand. This:

(function($) {
    $('ui').sortable();
})(jQuery);

becomes:

jQuery(document).ready(function($){
    $('ui').sortable();
});
Sign up to request clarification or add additional context in comments.

Comments

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.