Problem with draggable - TypeError: Result of expression '$(this).data('draggable')' [undefined] is not an object.

Problem with draggable - TypeError: Result of expression '$(this).data('draggable')' [undefined] is not an object.


Hi,
I'm using a combination of sortable and draggable in my application.
I have several list that need to be drag in a main sortable list.
Before 1.7 - in beta - It was working fine, but since the beta is over
I get a error when I drop the draggable on the sortable list. I'm
wondering if it is me who did something wrong.
I read the doc twice, but I cannot figure out what I did wrong.
If you have any clue, please let me know.
Thank you
Francis
When I drop the draggable on the sortable I got this error :
(developer js)
TypeError: Result of expression '$(this).data
('draggable')' [undefined] is not an object.
(min js)
TypeError: Result of expression 'a(this).data
('draggable')' [undefined] is not an object.
Code :
// Fisrt main sortable menu
$("#1menu").sortable({
items: 'li',
connectWith: ['ul, #trash'],
dropOnEmpty:true,
cursor: 'auto',
remove: function (event, ui){
// REMOVE submenu
$("#submenu_" + ui.item.context.id.split("_")
[1]).remove();
},
receive: function (ev, ui) {
// add double click only when in main menu
$(u).dblclick(function (){
doubleClickMenu($(u));
});
});
}
});
// WEB SITE PAGES - DRAGGABLE
$("li.pagenotdisplayed").each(
function (e, ui){
$(ui).draggable({
connectToSortable: '#1menu',
revert: true
});
});