0
我有一个文本框,我试图变成wyiswyg(使用jwysiwyg)。文本框不存在于页面上,直到ajax请求被触发,并通过请求将其加载到页面中。ajax请求后触发一个插件
我的问题是,我不能让文本框变得与正常
$('.wysiwyg').wysiwyg();
作为.wysiwyg
所见即所得不存在于DOM Ready
我怎么能解决这个问题,我曾尝试以下,
$("a.suggest-date").click(function(){
var self = $(this).attr('href');
$("#mask").show();
$("#suggestedDate").children().remove();
$("#send-date textarea").val("");
$.get(self + '#suggestedDate', null, function(result){
$("#ajax-loaded").append(result);
$(".wysiwyg").wysiwyg();
});
//$("#ajax-loaded").load(self + "#suggestedDate")
$("#ajax-loaded").show();
setTimeout(function() { $("#ajax-loaded").removeClass("loading"); $("#ajax-loaded header.loading").hide(); }, 500);
return false;
});
我在做什么明显错误?
http://api.jquery.com/ajaxSuccess/ – gearsdigital