I'm applying two css classes onto my html, when I click on my span element.
right now I have a border and looks fine, I want keep this.
but:
so If I click in the Icon I said in the icon <i> the Icon color change for blue.
but I don't want remove the functionality of the span who contains the border.
thanks.
html + angular
<div ng-app>
<div>
<br>
<i ng-class='{"gamepad-red":tog==1}' class="fa fa-lg fa-gamepad"></i>
<span id='1' ng-class='{"myclass":tog==1}' ng-click='tog=1'>span 1</span>
</div>
<div>
<br>
<i ng-class='{"gamepad-red":tog==2}' class="fa fa-lg fa-gamepad"></i>
<br/><span id='2' ng-class='{"myclass":tog==2}' ng-click='tog=2'>span 2</span>
</div>
</div>
css:
.myclass {
border: dotted pink 3px;
}
.gamepad-red {
color: red;
}
.gamepad-blue {
color: blue;
}
jsfiddle: http://jsfiddle.net/zvLvg/286/
ng-class="{'myclass':tog==2}"