if (rocket.type === "left") {
if (rocket.xCoord < parseInt(this.fieldEl.style.width)) {
rocket.move();
} else if (rocket.xCoord === parseInt(this.fieldEl.style.width)) {
this.rockets.splice(index, 1);
return;
}
}
if (rocket.type === "right") {
if (rocket.xCoord > 0) {
rocket.move();
} else if (rocket.xCoord === 0) {
this.rockets.splice(index, 1);
return;
}
}
document.addEventListener( 'DOMContentLoaded', function( event ) {
// Do something
});
var seeFooter = false;
$(window).scroll(function(){
var $element = $('#footer');
if ($(this).scrollTop() + window.screen.height >= $element.offset().top) {
if (!seeFooter) {
console.log('Футер показался снизу');
seeFooter = true;
}
} else {
seeFooter = false;
}
});