I have a div and in normal case display:block css is applied to it.And a hide button is there to hide the div on click on that button.But jquery's
$('#divid').css()
cant override css propoerty.Here is an example fiddle. jsfiddle
<div ng-controller="MyController">
<div id="div1" class="showdiv">This is the div need to hide on click
<a href='#' ng-click="hidedivfn()">Hide</a>
</div>
</div>
</div>
function MyController($scope) {
$scope.hidedivfn=function(){
$('#div1').css({ 'display': "none!important" });
}
}
.showdiv{
display:block;
}