0

I have a webpage that has three gif images on there, Id like users to be abel too see these images animate but they all animate when the page loads, Is there a easy way to stop this I found this plugin and wrote this to see if it work:

https://github.com/zuk/jquery.inview

$('#gif').on('inview', function(event, isInView) {
  if (isInView) {
    console.log("element #gif became visible in the browser's viewport");
  } else {
    console.log("element #gif became invisible in the browser's viewport");
  }
});

Im not sure what I would use to make the images animate when the user can see them. Any help to get this working would be appreciated!! Thanks Tom

Tom Withers
  • 1,171
  • 4
  • 16
  • 28

0 Answers0