我的html外观如下所示,我也在使用Bootstrap。我选择它之后,我希望菜单在我的侧边栏上保持打开状态。
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<ul class="treeview-menu" id="submenu_toggle">
<li>
<a href="tickets.php">
<i class="fa fa-circle-o sub_menu_fa"></i>Inbox
</a>
</li>
<li>
<a href="tickets.php?status=assigned">
<i class="fa fa-circle-o sub_menu_fa"></i>Mine
</a>
</li>
<li>
<a href="tickets.php?status=overdue">
<i class="fa fa-circle-o sub_menu_fa"></i>Overdue
</a>
</li>
<li>
<a href="tickets.php?status=closed">
<i class="fa fa-circle-o sub_menu_fa"></i>Closed
</a>
</li>
</ul>
答案 0 :(得分:2)
由于它不是单页应用程序,请考虑使用它。你需要加载这个js&amp; css在菜单项的每一页上。
<ComboBox Name="myComboBox"
SelectedIndex="0"
IsEnabled="{Binding ElementName=myCheckBox, Path=IsChecked, Converter={StaticResource InvertedBooleanConverter}}">
答案 1 :(得分:1)
<script>
$(function() {
// for bootstrap 3 use 'shown.bs.tab', for bootstrap 2 use 'shown' in the next line
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
// save the latest tab; use cookies if you like 'em better:
localStorage.setItem('lastTab', $(this).attr('href'));
});
// go to the latest tab, if it exists:
var lastTab = localStorage.getItem('lastTab');
if (lastTab) {
$('[href="' + lastTab + '"]').tab('show');
}
});
</script>