Jquery ui 链接新的jquery选项卡,并指定要加载的选项卡标题和ajax url
我到处找这个。链接如何指定要加载的选项卡标题和url? 比如:Jquery ui 链接新的jquery选项卡,并指定要加载的选项卡标题和ajax url,jquery-ui,jquery,Jquery Ui,Jquery,我到处找这个。链接如何指定要加载的选项卡标题和url? 比如: <a href="#" onclick="createNewTab('my tab title','','externalfile.html')">Create new tab dynamically</a> 我怎样才能结账呢 我发现最接近的是jquery,但我更喜欢使用jquery 谢谢 更新 我发现了jeasyui,看起来很简单,但我有一些问题。这是我的密码: <!DOCTYPE html P
<a href="#" onclick="createNewTab('my tab title','','externalfile.html')">Create new tab dynamically</a>
我怎样才能结账呢
我发现最接近的是jquery,但我更喜欢使用jquery
谢谢
更新
我发现了jeasyui,看起来很简单,但我有一些问题。这是我的密码:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html style="height: 100%; overflow: hidden;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>test</title>
<link rel="stylesheet" type="text/css" href="jeasyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="jeasyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
<script type="text/javascript" src="jeasyui/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="jeasyui/jquery.easyui.min.js"></script>
<script type="text/javascript">
function open1(title,plugin){
if ($('#tt').tabs('exists',title)){
$('#tt').tabs('select', title);
} else {
$('#tt').tabs('add',{
title:title,
href:plugin,
closable:true,
extractor:function(data){
var tmp = $('<div></div>').html(data);
data = tmp.find('#content').html();
tmp.remove();
return data;
}
});
}
}
</script>
</head>
<body class="easyui-layout" style="text-align:left">
<div region="north" border="false" style="background:#666;text-align:center">
<div id="header-inner">
<table cellpadding="0" cellspacing="0" style="width:100%;">
<tr>
<td rowspan="2" style="width:20px;">
</td>
<td style="height:52px;">
<div style="color:#fff;font-size:22px;font-weight:bold;">
<a href="/index.php" style="color:#fff;font-size:22px;font-weight:bold;text-decoration:none">TEST</a>
</div>
</td>
<td style="padding-right:5px;text-align:right;vertical-align:bottom;">
</td>
</tr>
</table>
</div>
</div>
<div region="west" border="false" split="true" title="Menu" style="width:250px;padding:5px;">
<ul class="easyui-tree">
<li iconCls="icon-base"><span>Base</span><ul>
<li iconCls="icon-gears"><a href="#" onclick="open1('test','demo.php')">test</a></li>
<li iconCls="icon-gears"><a href="#" onclick="open1('test1','demo.php')">test1</a></li>
<li iconCls="icon-gears"><a href="#" onclick="open1('test2','demo.php')">test2</a></li>
<li iconCls="icon-gears"><a href="#" onclick="open1('test3','demo.php')">test3</a></li>
</ul>
</div>
<div region="east" border="false" split="true" title="Live " style="width:250px;padding:5px;">
<h1>Hello</h1>
</div>
<div region="center" border="false">
<div id="tt" class="easyui-tabs" fit="true" border="false" plain="true">
<div title="Welcome" href="dashbord.php"></div>
</div>
</div>
</body>
</html>
测试
函数open1(标题、插件){
if($('#tt').tabs('exists',title)){
$('#tt')。选项卡('选择',标题);
}否则{
$('#tt')。制表符('添加'{
标题:标题,,
href:plugin,
closable:是的,
提取器:函数(数据){
var tmp=$('').html(数据);
data=tmp.find('#content').html();
tmp.remove();
返回数据;
}
});
}
}
- base
你好
它添加了一个带有标题的新选项卡,但不加载URL(demo.php)使用jQuery UI
使用jQuery用户界面
您是否正在寻找用于在页面上创建选项卡的插件?如果有用于执行类似操作的插件,我会感兴趣查看它。您是否正在寻找用于在页面上创建选项卡的插件?如果有用于执行类似操作的插件,我会感兴趣查看它。我不明白。。。完整的代码在jQuery上,按我给你的链接上的查看源代码,你就得到了你所需要的一切。我不能告诉你们更多,除非你们告诉我你们到底需要什么。也许你们不知道如何使用UI?你只需要在你的网站上添加带有jQuery的UI插件,你可以在这里下载,我不明白。。。完整的代码在jQuery上,按我给你的链接上的查看源代码,你就得到了你所需要的一切。我不能告诉你们更多,除非你们告诉我你们到底需要什么。也许你们不知道如何使用UI?你只需要在你的网站上添加带有jQuery的UI插件,你可以在这里下载