var drawFish function fish X fish Y fill0 255 153 ellipse f
var drawFish = function (fish X, fish Y) {fill(0, 255, 153); ellipse (fish X, fish Y, 100, 40); fill (10, 3, 3); ellipse (fish X + 40, fish Y, 10, 10); fill(0, 255. 153); triangle(fish x - 70, fish Y-50, fishX-70), fish y + 50, fish Y - 50, fish Y);};//Add for loop here to make fish move to the right edge for(var I = 1; i
Solution
$(function() {
var img = drawfish(fishX,fishY),
width = img.get(0).width,
screenWidth = $(window).width(),
duration = 5000;
function animatePlane() {
img.css(\"left\", -width)
.animate({
\"left\": screenWidth
}, duration, animatePlane);
}
animatePlane();
});
