I have a div which I would like to expand/contract when I click on it. I created the div:
<div ng-click="disclaimer();" style="height:100px;width:100px;overflow:{{expand}}">Sample Text</div>
When the user clicks the div, it simply toggles $scope.expand from hidden to default (or atlteast it should)
$scope.disclaimer=function(){
if($scope.expand="hidden"){
$scope.expand="default";
}
else if($scope.expand="default"){
$scope.expand="hidden";
}
}
Right now, it expands the div (so $scope.expand changes from hidden to default) but does not contract when I click the div again. Any ideas? Thanks for the help