开发者

CKEditor, JQuery: Animation breaks the editor

I initialize a CKEditor in a <div style="display:none" id="container"></div> element.

$('#con开发者_运维技巧tainer').show(); shows the editor and everything works.

However, if i combine the call with an animation like $('#container').show('blind');, the editor comes to the foreground (btw: the animation looks sweet), but however, the editor gets broken.

Did someone had the same problem? Is this a jquery or a CKEditor bug?

I think its a scaling problem, because scale and blind don't work.


I have the same problem. As a work around I used the .slideDown() function from plain jQuery and the CKEditor worked. Something like this:

$('#container').slideDown();

As well as .slideDown() there is also .slideUp() and .slideToggle().


Just discovered a work-around for this. If you re-paste your data once again after the animation, it seems to work! For example:

$j(".content-other").hide('slide', {direction: "right"}, 400, function () {
        $j(this).html(data); // show it initially for the slide-in
        $j(this).show('slide', {direction: "right"}, 400, function () {
            $j(this).html(data); // after the animation's done, place it again
        });
});

The second html() is what's important. Seems the animating process does something to it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜