CSS + JavaScript Transition ()
Can you have two different _ #elem:hover{ width:integer(50} #elem:active{width:integer(10)} For the integer, for the first one I used width 50, and for the second one, I used width 10. So is that even possible and how would I apply the hover and the active differently? Here's why I need it : On (javaScript ), I want to do this... 1 Function myFunction(){ 2 var x = document.getElement 3 ById("elem"); 4 if (x.style.transition==="width 5s") 5 {x.style.transition="width 1s";} else {x.style.transition="width 5s" }} So on line 4 if the statement on line 4 is true(if), the line 5 should be excuted. Which first if the transition is width 5s, then be width 1s. I got two different transitions. I'm not sure how the JS is supposed to work. Help...