I'm trying to use Jquery-UI in an admin page in my plugin, and I'm getting this error when I try to use a jquery-ui function:
jQuery("ul").sortable is not a function
Here is how I'm loading the scripts:
function list_ads_scripts() {
wp_enqueue_script('jquery-ui-core');
wp_enqueue_script('jquery-ui-dropable');
wp_enqueue_script('jquery-ui-dragable');
wp_enqueue_script('jquery-ui-selectable');
wp_register_script('list_ads', WP_PLUGIN_URL.'/ad_manager/js/list_ads.js', array('jquery', 'jquery-ui-core'));
wp_enqueue_script('list_ads');
}
And here is my javascript file (list_ads.js):
jQuery.noConflict();
jQuery(document).ready(function(){
alert('test');
jQuery('ul').sortable();
});
The alert appears succesfuly, I just get the error with the sortable function.