Damir
Damir

Reputation: 56199

How to get id of current draggable and resizable?

How to get id of current draggable and resizable ? I have like

$('.demo')
.resizable({
start:function(event,ui){
$(ui).item.attr('id);
}

})
.draggable({
start:function(event,ui){
$(ui).item.attr('id);
}
});

but it returns undefined. Does anyone know solution ?

Upvotes: 1

Views: 54

Answers (1)

antyrat
antyrat

Reputation: 27765

You missed ' symbol:

$(ui).item.attr('id');

Upvotes: 2

Related Questions