Sunday, 25 August 2013

jQuery textarea draggable

jQuery textarea draggable References OI have a simple problem with jQuery draggable with a textarea. I have to insert a textarea into a div draggable but the area of textarea isn\'t draggable, only border! I have tried to disable textarea but nothing. I would like to have a textarea NOT editable but draggable / resizable. This is my html code:
\" style=\"position:absolute; width:100px; height:100px; top:50px; left:10px; z-index:50;\">
My jQuery code: $(\'.drag-item\').draggable({ snap : true, cursor : \"move\", delay : 100, scroll : false, containment : \"parent\", stop: function (e, ui){ //some code }, drag: function(e, ui){ //some code } }).resizable({ containment : \"parent\", stop: function(e, ui) { var width = ui.size.width; var height = ui.size.height; var hereDrag = this; if($(hereDrag).find(\'textarea\').length > 0){ $(hereDrag).find(\'textarea\').css(\'width\', width - 10); $(hereDrag).find(\'textarea\').css(\'height\', height - 10); } }, resize: function(e, ui){ //some code } }) How can I make this textarea not editable but draggable and resiazable in all the area e not onyl to the border? Thanks

No comments:

Post a Comment