I need to resize the picture of a certain size, on first double click make it bigger, but on second double click make it the original size. It is a school homework and I am not good at JS and english is my third language, so please do not be mad. My img tag placed in body and JS functions.
<img ID="obr" src="pes.png" width="700" height="50" ondblclick="big()" ondblclick="old()">
function big() {
obr.width="750";
obr.height="600";
}
function old() {
obr.width="700";
obr.height="550";
}
Works for just making the image bigger, but does not shrink back. I appreciate every comment. Thank you for yout time and help.