我有一个打开导航栏的按钮:
点击它后,它就会成为某种打击者:
点击某个导航栏项(因此切换到下一个状态/视图)后,命中标记应该消失。不幸的是,直到我点击一个随机元素才会出现hitmarker。
按钮的html:
<div ng-controller="navbarCtrl" ng-cloak>
<md-content>
<md-toolbar>
<div class="md-toolbar-tools">
<md-button class="md-icon-button" ng-click="toggleMenu()" aria-label="Menu">
<md-icon md-svg-icon="assets/img/menu.svg"></md-icon>
</md-button>
<h2>
<span><a ui-sref="overview">Test</a></span>
</h2>
<span flex></span>
<md-button class="md-icon-button" ui-sref="account" aria-label="Account">
<md-icon md-svg-icon="assets/img/account.svg"></md-icon>
</md-button>
</div>
</md-toolbar>
</md-content>
<section layout="row" flex>
<md-sidenav class="md-sidenav-left md-whiteframe-z2" md-component-id="left">
<md-toolbar class="md-theme-indigo" layout="row">
<h1 class="md-toolbar-tools">Menu</h1>
<span flex></span>
<md-button class="md-icon-button" aria-label="close" ng-click="close()">
<md-icon md-svg-icon="assets/img/closeNavbar.svg"></md-icon>
</md-button>
</md-toolbar>
<div layout="column" layout-align=" center">
<md-button ui-sref-active="active" ng-click="close()" layout-align=" center" style="text-align:left" ui-sref="overview">Overview</md-button>
</div>
</md-sidenav>
</section>
</div>
<div ui-view></div>
为了解决这个问题,我需要更改什么?
答案 0 :(得分:1)
你需要在CSS中使用它:
.md-focused {
background: transparent !important;
}
答案 1 :(得分:0)
将此添加到您的CSS:
function setAllCheckboxes(divId, sourceCheckbox) {
divElement = document.getElementById(divId);
inputElements = divElement.getElementsByTagName('input');
for (i = 0; i < inputElements.length; i++)
$('.checkbox').each(function() {
this.checked = true;
/* this.click(); */
this.fireevent('onChange');
/* or you can call this.onChange(); */
});
{
if (inputElements[i].type != 'checkbox')
continue;
inputElements[i].checked = sourceCheckbox.checked;
}
}