I want to make a box expand when it is clicked, which I've achieved. But the transition effect does not work if I use percentage for height, even though the transition work when defined in pixels.
I saved a snippet of the site in this codepen: https://codepen.io/anon/pen/JZGWBW
this works:
function height(ev, thisElement){
thisElement.style.height = "200px";
}
this does not:
function height(ev, thisElement){
thisElement.style.height = "100%";
}
Any ideas as to why this happens?