Cyberek wrote:Could You please post an url to your site?
// animate on init
window.addEvent('load', function() {
if(elementsToAnimate.length > 0) {
// get the necessary values and positions
var currentPosition = window.getScroll().y;
var windowHeight = window.getSize().y;
// iterate throught the elements to animate
if(elementsToAnimate.length) {
for(var i = 0; i < elementsToAnimate.length; i++) {
if(elementsToAnimate[i][2] < currentPosition + (windowHeight / 1.75)) {
// create a handle to the element
var element = elementsToAnimate[i][1];
// check the animation type
if(elementsToAnimate[i][0] == 'animation') {
gkAddClass(element, 'loaded', false);
// clean the array element
elementsToAnimate[i] = null;
}
// if there is a queue animation
else if(elementsToAnimate[i][0] == 'queue_anim') {
element.getElements('.animate_queue_element').each(function(item, j) {
gkAddClass(item, 'loaded', j);
});
// clean the array element
elementsToAnimate[i] = null;
}
}
}
// clean the array
elementsToAnimate = elementsToAnimate.clean();
}
}
});