6323705,
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title> - jsFiddle demo</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://cdn.rawgit.com/dirkgroenen/jQuery-viewport-checker/1.7.4/src/jquery.viewportchecker.js"></script>
<script>
jQuery(document).ready(function() {
jQuery('.chart2 img').viewportChecker({
classToAdd: 'animated fadeIn',
offset: 100,
repeat: true,
callbackFunction: function(elem, action) {
elem[0].src = action == 'add' ? 'http://fufel.info/uploads/posts/2014-04/1396388286_gifs_020.gif' : '';
}
});
})
</script>
<style type='text/css'>
.chart2 img{
height: 200px;
}
</style>
</head>
<body>
<div class="chart2 animated" id="chartContainerPie2" style="margin-top:1200px;height: 300px; float: left;width: 60%;">
<img src="" alt=""></div>
</body>
</html>