开发者

jQuery clone isn't styled

开发者 https://www.devze.com 2023-03-19 08:58 出处:网络
To get around the fact that the thing I\'m dragging is inside a parent container that I need to drag it out of, I\'m using a clone to drag i开发者_运维问答nstead.

To get around the fact that the thing I'm dragging is inside a parent container that I need to drag it out of, I'm using a clone to drag i开发者_运维问答nstead.

$(".innerEvent").draggable({
    revert: "invalid",
    helper: "clone",
    appendTo: "body"
});

This works perfectly except that the font goes from pretty to ugly. Why isn't the clone inheriting the style of the original? Or is there some other issue here?


probably the style is defined in a a "parentContainer child" style which is broken when you clone the element and attach it directly to the body.

Try to improve your style definitions to target the cloned entity as well.

0

精彩评论

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