draggable stop and droppable bug?
Hello.
I have the same code (i created a backgammon game) in two pages. In one it is a simple html with the js attached, and it does not communicate with the server. So i cannot send the move to the other player.
The other other one is an aspx page with the same html (literally nothing changed) and is imported at a main page as an iframe so as to create the tables for two players to play.
The weird think is this. In both pages, in the js code (which i repeat that it is the same exactly) i have a draggable
$('div[title="' + i + '"]')
.draggable({
containment: 'table',
cursor: 'pointer',
revert: true,
start: takePieceForDragStart,
stop: removeValidForDragOnStop
});
$('div[title="' + i + '"]').bind("click", makeMove);
and a dropable
$('div[title="'+k+'"]').addClass("valid").droppable({
drop: leavePieceDragAndDropped
});
in the non-i frame when i drop the draggable in the droppable the stop function of the draggable is NOT happening.
while in the i-frame imported, when i drop the draggable in the dropable the stop function is happening.
So can anyone suspect why is this happening? or tell me which one of them is the correct so i could find out whats going on?