draggable&droppable doesn't work
I have a strange problem with draggable&droppable elements.
Here are fragments of code:
- $ ( ".letter" ).draggable();
- $ ( ".simpleSlot" ).droppable({
- drop : function ( event, ui ) {
- var idDrag = ui.draggable. attr ( "id" );
- var idDrop = $ ( this ). attr ( "id" );
- doneWord [ idDrop . charAt ( 0 )]= idDrag ;
- $ ( "#test ). text ( "Good dragged!" + "IdDrag:" + idDrag + " IdDrop:" + idDrop );
- $ ( "#test2" ). text ( "doneWord:" + doneWord );
- $ ( "#test3" ). text ( "splitedWord:" + splitedWord );
- }
- });
- (.....................................)
- (...................................)
- (next function, about draggable element, droppable is doing the same way)
- for ( var i = 0 ; i < splitedWord . length ; i ++){
- var divId = i + splitedWord [ i ];
- var positionX = (( slotsWidthArea / splitedWord . length ))* i ;
- var simpleSlot = $ ( "<div class= \" simpleSlot ui-widget-header \" id= \" " + divId + " \" ></div>" ). text ( splitedWord [ i ]);
- $ ( "#slots" ). append ( simpleSlot );
- $ ( "#" + divId ). css ({
- left : positionX
- });
- }
Problems:
1. When I put any draggable element into dropable "slot" - I can't move it anymore. Why?
I was verifying html, css etc - everything works. Only this two problems are for me completely incomrehesible.