Zend framework 在Zend中将Ajax与jQuery UI结合使用
你好,斯塔克斯 我想知道在Zend Framework中是否可以将ajax链接与jQuery ui工具一起使用: 我有一个tabContainer,但所有选项卡内容都必须在创建时提供。。有没有简单的方法可以使用ajax在所选窗格中只加载内容 [编辑] 我终于找到了:Zend framework 在Zend中将Ajax与jQuery UI结合使用,zend-framework,jquery-ui,jquery,Zend Framework,Jquery Ui,Jquery,你好,斯塔克斯 我想知道在Zend Framework中是否可以将ajax链接与jQuery ui工具一起使用: 我有一个tabContainer,但所有选项卡内容都必须在创建时提供。。有没有简单的方法可以使用ajax在所选窗格中只加载内容 [编辑] 我终于找到了: $this->tabPane( 'MyTabGroup', '', // no content needed cause we're loading it with Ajax array(
$this->tabPane(
'MyTabGroup',
'', // no content needed cause we're loading it with Ajax
array(
'title' => 'My link title',
// here is the trick : contentUrl contains the url we want to load with Ajax
'contentUrl' => $this->url(array(
'module' => 'default',
'controller' => 'declaration',
'action' => 'consulter'
)
),
)
);
你想让你的UI标签插件加载一个URL,而不是切换现有内容的可见性 如果是这种情况,那么您可以查看UI选项卡演示页面以获取示例:
UI选项卡现在将使用AJAX将href加载到选项卡空间。实际上,我正在寻找一种使用ZendX jQuery helpers API实现这一点的方法,但也许我编写自己的helper会更快
$('#example').tabs({
load: function(event, ui) {
$('a', ui.panel).click(function() {
$(ui.panel).load(this.href);
return false;
});
}
});