Using JQueryUi functions

Using JQueryUi functions

by Mohammad Eftekhari -
Number of replies: 2

Hi.

I don't know how to use JQueryUI functions using AMD! I want to make a div Resizable but i don't know how to do that in moodle. This is what I have been testing  :


define(['jquery','jqueryui'],
function($, jqui) { //loads dependencies
var functions = {

init : function() {
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! None of this works !!!!!!!!!!!!!!!!!!!!!!!!!
$("#leftside").ui.resizable();
$.ui("#leftside").resizable();
$("#leftsize").resizable();
}

};
return functions;
});
Average of ratings: -
In reply to Mohammad Eftekhari

Re: Using JQueryUi functions

by Mohammad Eftekhari -

Found the solution.

define(['jquery','jqueryui'],
function($, jqui) { //loads dependencies
var functions = {
init : function() {
$("#leftside").resizable();
}
};
return functions;
});


The third one was correct as it should be. The problem was something else.

When "jquery-ui.css" is not included the resizable function doesn't work. Make sure Moodle or You have included this file. "$PAGE->requires->css..."