JWYSIWYG or jHtmlArea within a Jquery Ui Tab(Jquery Ui 选项卡中的 JWYSIWYG 或 jHtmlArea)
问题描述
我无法让我的 jwysiwyg 和 Jhtmlarea 文本编辑器在 AJAX 加载的 Jquery UI 选项卡中工作
两个文本编辑器在正常加载时都可以工作.
Both text editors work when loaded normally.
这会加载查看页面"上的标签
This loads the tabs on the "View Page"
<script type="text/javascript">
$(function() {
$("#tabs").tabs();
});
</script>
这会在查看页面"上通过 AJAX 加载页面
This loads the page via AJAX on the "View Page"
<li><a href="/page/edit/">Edit</a></li>
这会加载编辑页面"上的 Html 区域
This loads the Html Area on the "Edit Page"
<script type="text/javascript" charset="utf-8">
$(function(){
$("textarea").htmlarea();
});
</script>
所有帮助将不胜感激.
提姆
推荐答案
因为你在页面加载后将你试图 htmlarea-ize 的东西注入到 DOM 中,你必须把你的 $("textarea").htmlarea()在ajax调用的回调函数里面.
because you're injecting the things you're trying to htmlarea-ize into the DOM after the page loads, you have to put your $("textarea").htmlarea() inside the callback function of the ajax call.
这篇关于Jquery Ui 选项卡中的 JWYSIWYG 或 jHtmlArea的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Jquery Ui 选项卡中的 JWYSIWYG 或 jHtmlArea
基础教程推荐
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
- 每次设置弹出窗口的焦点 2022-01-01
