I have problem to put my own Javascript in a separate file and use it from JQWicket (testing Drag & drop plugin). Here is myscript.js:
com.mycompany.Test = function() {
return {
test_func: function() {
$('#msg').text('X position = ' + ui.position.left + ', Y position = ' + ui.position.top);
}
}
}
And in the java I want to call test_func:
DraggableOptions drop = new DraggableOptions().dragEvent(
"com.mycompany.Test.test_func()");
But it does not work! I think the problem is that myscript.js is included before jquery.js and I do not know how to reorder include statements.
I’m very grateful if anyone has a working example with a separate javascript file that is called from jqwicket!
Thanks in advance!
Add an JQBehavior instance referencing “myscript.js” to your component/page like this: