ungleich landing page animation delay reduced, direction changed

This commit is contained in:
Arvind Tiwari 2017-11-01 02:50:47 +05:30
commit 16f8ab6ecc
5 changed files with 31 additions and 41 deletions

View file

@ -2,16 +2,16 @@
$(function(){
new WOW().init();
$('.img-toggle').one('mouseover', toggleImage);
$('.img-toggle').one('mouseenter', toggleImage);
});
function toggleImage(e) {
var $this = $(this),
toggle_img = $this.attr('data-replaced'),
current_img = $this.attr('src');
$this.fadeOut(600, function() {
$this.fadeOut(200, function() {
$this.attr('src', toggle_img);
$this.attr('data-replaced', current_img);
$this.fadeIn(900);
$this.fadeIn(300);
});
};