问题
I'm using cleditor on one of my sites and I have run into a problem. When I use effect to animate some divs cleditor's wysiwyg editor stops working. The editor itself shows but I cant type anything into it. I can view/edit the source on the editor just fine.
Code I use to toggle between divs:
function emailwizardplace(pold, pnew) {
$("#wizard-" + pold).hide();
$("#wizard-" + pnew).effect('slide');
//$("#wizard-" + pnew).show(); <= This works without problems
}
Code for calling cleditor:
$("#tmessage").cleditor({
width: 680,
height: 400
});
As always any help is appreciated.
回答1:
This seems to be a problem with the interaction between CLEditor and jQuery.UI. Have you tried this?
$("#tmessage").cleditor()[0].disable(false).refresh();
There's quite a bit of discussion in google groups on this problem. Here's one link that outlines the problem and what others have done. https://groups.google.com/forum/?fromgroups#!topic/cleditor/6W36CyPsaVU
Hope this helps.
回答2:
function emailwizardplace(pold, pnew) {
$("#wizard-" + pold).hide();
$("#wizard-" + pnew).effect('slide');
$("#wizard-" + pnew).show('slide',function(){
$("#tmessage").cleditor({
width: 680,
height: 400
});
});
};
You have to place the call for the cleditor inside the .show()
来源:https://stackoverflow.com/questions/7538715/cleditor-problem-with-jquery-ui-effect