Perhaps you want something that is outlined in these questions: Check if element is visible on screen or Check if element is visible after scrolling, that is, you check if the element-in-question's top offset is within the screen's bounds, and then start your animation if that condition is true.
var theElementInQuestion = document.getElementById("theElementInQuestion");
if (isScrolledIntoView(theElementInQuestion)) {
startAnimation();
}
function isScrolledIntoView(elem)
{
var docViewTop = $(window).scrollTop();
var docViewBottom = docViewTop + $(window).height();
var elemTop = $(elem).offset().top;
var elemBottom = elemTop + $(elem).height();
return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
}