I have a function called saveSmilies which accepts two parameters: the dragged element id and the dropped element id.
I’m trying to do this like:
$('.draggable').draggable({
revert: true,
drop: function() {
$dropped = $(this);
},
stop: function() {
quiz1.saveSmilies($(this).attr('id'), $dropped);
}
});
But it doesn’t work… Am I doing this completely wrong? Or just a typo somewhere?
So basically If I dragged an element with an id of ‘box1’ and dropped it on an element with an id of ‘box2’ then it would do the following: quiz1.saveSmilies('box1','box2');
This should work: