Skip to content

Commit

Permalink
responsive 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Lourguioui committed Feb 13, 2020
1 parent a246ecf commit 80a3f2b
Showing 1 changed file with 2 additions and 40 deletions.
42 changes: 2 additions & 40 deletions assets/js/dino.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
var $element_height = $element.outerHeight();
var $element_top_position = $element.offset().top;
var $element_bottom_position = ($element_height + $element_top_position);
console.log($element_bottom_position)

if(($element_bottom_position >= $window_top_position) && ($element_top_position <= $window_bottom_position)){
$element.animate({left : '0px',opacity : '1'}, "slow");

Expand All @@ -59,7 +59,7 @@
var $element_height = $element.outerHeight();
var $element_top_position = $element.offset().top;
var $element_bottom_position = ($element_height + $element_top_position);
console.log($element_bottom_position)

if(($element_bottom_position >= $window_top_position) && ($element_top_position <= $window_bottom_position)){
$element.animate({right : '0px',opacity : '1'}, "slow");

Expand All @@ -74,44 +74,6 @@
/*============================ end objectifs animations ================================*/
/*============================= thematique animations ===============================*/

/* var $animation_element_them = $(".them.animated-element-left");
var $animation_element_right_them = $(".them.animated-element-right");
var $window = $(window);
function check_in_view(){
var $window_height = $window.height();
var $window_top_position = $window.scrollTop();
var $window_bottom_position = ($window_top_position + $window_height);
$.each($animation_element_them, function (){
var $element = $(this);
var $element_height = $element.outerHeight();
var $element_top_position = $element.offset().top;
var $element_bottom_position = ($element_height + $element_top_position);
console.log($element_bottom_position)
if(($element_bottom_position >= $window_top_position) && ($element_top_position <= $window_bottom_position)){
$element.animate({left : '0',opacity : '1'}, "slow");
}else{
// $element.animate({right : "200px",opacity : 'O'}, "slow");
}
})
$.each($animation_element_right_them, function (){
var $element = $(this);
var $element_height = $element.outerHeight();
var $element_top_position = $element.offset().top;
var $element_bottom_position = ($element_height + $element_top_position);
console.log($element_bottom_position)
if(($element_bottom_position >= $window_top_position) && ($element_top_position <= $window_bottom_position)){
$element.animate({right : ' 0px',opacity : '1'}, "slow");
}else{
// $element.animate({right : "200px",opacity : 'O'}, "slow");
}
})
}
$window.on('scroll', check_in_view);
$window.trigger('scroll');*/
/*============================= mobile cards ==========================================*/
/*=====================================================================================*/

Expand Down

0 comments on commit 80a3f2b

Please sign in to comment.