gpt4 book ai didi

jquery - UIB 选项卡 - 设置第二个选项卡处于事件状态

转载 作者:行者123 更新时间:2023-12-03 22:37:26 25 4
gpt4 key购买 nike

它是uib bootstrap插件。默认激活第一个选项卡。我需要将第二个选项卡设置为默认事件状态。请尽快帮助我。

  <!doctype html>
<html ng-app="ui.bootstrap.demo">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular-animate.js"></script>
<script src="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-1.2.4.js"></script>
<script type="text/javascript">
angular.module('ui.bootstrap.demo', ['ngAnimate', 'ui.bootstrap']);
angular.module('ui.bootstrap.demo').controller('TabsDemoCtrl', function($scope, $window) {

});
</script>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div ng-controller="TabsDemoCtrl">
<uib-tabset active="active">
<uib-tab index="0" heading="Static title">Static First</uib-tab>
<uib-tab index="1" heading="Static title1">Static Second</uib-tab>
<uib-tab index="2" heading="Static title2" active="true">Static Third</uib-tab>
</uib-tabset>
</div>
</body>
</html>

最佳答案

类似于:

<div ng-controller="TabsDemoCtrl" ng-init="indextab = 1">
<uib-tabset active="indextab">
<uib-tab index="0" heading="Static title">Static First</uib-tab>
<uib-tab index="1" heading="Static title1">Static Second</uib-tab>
<uib-tab index="2" heading="Static title2" active="true">Static Third</uib-tab>
</uib-tabset>
</div>

满足您的需要。

已更新 plunker

关于jquery - UIB 选项卡 - 设置第二个选项卡处于事件状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36011804/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com