Here is the code for the looping cloud, the animation loops from right to left and I would like to make the cloud resize-able when clicked on but I do not know how to do it...
<!DOCTYPE>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>
<div id="clouds">
<img border="0" alt="animated clouds" src="clouds.png">
<script>
$(document).ready(function() {
function loop() {
$('#clouds').css({right:0});
$('#clouds').animate ({right: '+=1400'}, 5000, 'linear', function() {
loop();
});
}
loop();
});
</script>
</div>
</body>
</html>
Here is what I tried for resizing the cloud:
$("#clouds").click(function() {
$("size").animate({"height" : "350"}, 500);
});
And the CSS:
#clouds {
position:absolute;
z-index:500;
right:0px;
top:10px;
}
In this code we animate the divisions in such a way that it animate from left to right and then right to left