Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
As context, working on a mobile project.
Goal here is simply to highlight a 3D Image widget when it is being clicked. Obviously the easiest method is with css using the "class:psuedo-class" active state. However that doesn't work.
I have already verified that the property can be applied to the widgets.
My question is as to the best approach?
A) Use JS to change the class of the widget and then run a timeout to change it back after one second?
B) Continue to try and use a psuedo-class?
Thinking something like....
$scope.Active = function (elem) {
document.getElementById(elem).classList.add('ActiveBTN');
$timeout(function(){
document.getElementById(elem).classList.remove('ActiveBTN');
}, 1000 )
}
I add this to a Button, it works.
.btnText{
color: firebrick;
font-size: 1em;
}
.btnText:active{
color: steelblue;
font-size: 2em;
}
Nevertheless, Style changes right away when the Press stops.
So, JavaScript could be a more versatile approach.
BRs,