Items not draggable after tiny mce is initialised and destroyed
I've functionality to drag drop elements such as text, image etc on page. The elements once dragged on to the page needs to be drag-gable so that their positions can be changed. I'm using tiny mce to edit the text elements. I initialize editor on click of the text element and save its content and destroy it by clicking outside of the editor. The drag drop of the elements already added to the page works until, I initialize tiny mce. After editing text and saving, drag drop stops working.
While saving the contents of editor, I'm just replacing the content of text element by the content of editor, so also, copying the classes and add them to the text element. I confirmed that the element has ui-draggable cla开发者_StackOverflowss, but it is not drag-gable...what may be the reason?
Code:
$('.TEXTElementC').live('mouseover', function(e){
var thistarget=$(this);
$(thistarget).draggable({
scroll:true,
revert:true,
handle: $(thistarget),
cursorAt:{left: 5}
});
});
精彩评论