Дополнен 4 года назад
$(document).ready(function () {
console.log('Ready');
$('header .left_side').hover( function() {
var self_first = $('header .left_side a:first-child');
var self_last = $('header .left_side a:last-child');
self_first[0].style.animationPlayState = 'paused';
self_last[0].style.animationPlayState = 'paused';
setTimeout(() => {
self_first.animate({
}, 1000, "linear",
function () {
self_first.offset({
top: 85,
left: 44
})
})
self_last.animate({
}, 1000, "linear",
function () {
self_last.offset({
top: 35,
left: 44
})
})
}, 100)
},
function () {
var self_first = $('header .left_side a:first-child');
var self_last = $('header .left_side a:last-child');
self_first[0].style.animationPlayState = 'running';
self_last[0].style.animationPlayState = 'running';
setTimeout( () => {
self_first.animate({
}, 100,
function () {
self_first.offset({
top: 75,
left: 44
})
})
self_last.animate({
}, 100,
function () {
self_last.offset({
top: 100,
left: 44
})
})
}, 100)
})
})
Дополнен 4 года назад