Despite reading 5 tutorials on how to initiate a CSS-Transition with JavaScript, I am unable to get it to work properly. My current browser is Safari. Below is the code that I have been working on:
<html>
<head>
<title>Test</title>
<style type="text/css">
#test{
width: 100px;
height: 100px;
background-color: aqua;
transition: width 3s linear;
}
</style>
<script type="text/javascript">
function test(){
document.getElementById('test').style.width = 200+'px';
}
</script>
</head>
<body>
<div id="test">
</div>
<button onclick="test()">Los</button>
</body>
</html>