jQuery MiniUI
标题:
mini-tabs设置activeIndex后,onactivechanged触发两次
[打印本页]
作者:
Krison_LY
时间:
2021-5-25 15:09:22
标题:
mini-tabs设置activeIndex后,onactivechanged触发两次
mini-tabs设置activeIndex大于0时,onactivechanged事件触发两次,有什么解决办法没有?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Tabs</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /><link href="../demo.css" rel="stylesheet" type="text/css" />
<script src="../../scripts/boot.js" type="text/javascript"></script>
</head>
<body>
<h1>Tabs 选项卡</h1>
<div id="tabs1" class="mini-tabs" activeIndex="1" style="width:350px;height:200px;" plain="false">
<div title="Tab1" >
1
</div>
<div title="Tab2" iconCls="icon-cut" >
2
</div>
<div title="Tab3" showCloseButton="true">
3
</div>
<div title="Tab4" showCloseButton="true" enabled="false">
4
</div>
</div>
<script type="text/javascript">
mini.parse();
var i=1
function onTabPositionChange(value) {
var tabs = mini.get("tabs1");
tabs.setTabPosition(value);
}
function onTabAlignChange(value) {
var tabs = mini.get("tabs1");
tabs.setTabAlign(value);
}
function x(){
alert(i)
i++
}
</script>
</body>
</html>
作者:
felt
时间:
2021-5-25 17:58:20
这有何影响?
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2