开发者

Items not draggable after tiny mce is initialised and destroyed

开发者 https://www.devze.com 2023-02-07 10:13 出处:网络
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 t

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}
        });
});
0

精彩评论

暂无评论...
验证码 换一张
取 消