I am learnig JavaScript and I notice that I don't know how to trigger change in my test web site when div resize.
Here is code:
<!DOCTYPE html>
<html>
<head>
<script>
var expanded = document.getElementById('Proba').style.width='100%';
function Expand() {
document.getElementById('Proba').style.width='100%';
document.getElementById('Proba').style.height='100%'
document.getElementById('Proba').style.position='absolute';
document.getElementById('Proba').style.left='0px';
document.getElementById('Proba').style.top='0px';
document.getElementById('Proba').style.opacity='0.68';
document.getElementById('Proba').style.zIndex='1';
}
</script>
<style>
#Proba
{
background-color:#b0c4de;
width: 100px;
height: 100px;
}
</style>
</head>
<body id="Body">
<script>
if (expanded=true) {
document.write('You did it!')}
</script>
<div id="Proba" onclick="Expand()"><div>
</body>
</html>
Obviously, if statement doesn't give me what I want.