Use left and right arrow keys to navigate this slide show.
"));
$title=$item.find('.main-caption');
$fade = $item.find('.bgfade');
$fade.height($title.height() + 50);
$item.on('keyup',
function(event) {
if(event.keyCode===13||event.keyCode===32) {
$item.find('.experience-link').click();
}
});
});
$(document).ready(function() {
var time=10;
var $bar,
$slick,
isPause,
tick,
percentTime;
$slick=$(expMain);
$slick.slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: true,
dots: true,
fade: true,
asNavFor: expNav,
prevArrow: '
',
nextArrow: '
'
})
.on("beforeChange",function() {
startProgressbar();
});;
$(expNav).slick({
slidesToShow: 3,
slidesToScroll: 1,
asNavFor: expMain,
dots: false,
vertical: true,
focusOnSelect: true,
centerPadding: 0,
centerMode: true,
arrows: true,
infinite: true,
useTransform: false,
responsive:{
breakpoint: 992,
settings: "unslick",
},
prevArrow: '
',
nextArrow: '
',
})
.on("setPosition",function() {
setTimeout(function() {
var $item=$slick.find('.slick-slide .experience-item').first();
var $list = $(expNav).find('.slick-list');
var $track = $(expNav).find('.slick-track');
if($item.length===0) return;
if($item.height()!== $(expNav).height()) {
$(expNav).height($item.height());
}
$list.height($item.height());
if ($track.find('.slick-slide').length < 4) {
// making margin-top the inverse of top so they cancel each other out (e.g. top: -100px, margin top is 100px)
$track.css({marginTop:(parseInt($track.css('top')) * -1) + "px"});
}
},
0);
});
$bar=$('.slider-progress .progress');
$items=$slick.find('.slick-slide .experience-item');
$items.hover(function() {
if(window.innerWidth < 991) return;
$t = $(this);
$title = $t.find('.main-caption');
$summary=$t.find('.summary');
$fade = $t.find('.bgfade');
sumHeight = $summary.height() + 30 > 185 ? 215:$summary.height() + 30;
$title.css({ transform: 'translateY(-'+sumHeight+'px)' }); // add 30px for bottom margin
$fade.height(sumHeight + $title.height() + 50);
},
function() {
$t = $(this);
$title = $t.find('.main-caption');
$title.css({ transform: 'translateY(0)' });
$fade.height($title.height() + 50);
});
var isMobile={
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
},
Opera: function() {
return navigator.userAgent.match(/Opera Mini/i);
},
Windows: function() {
return navigator.userAgent.match(/IEMobile/i);
},
any: function() {
return (isMobile.Android()||isMobile.BlackBerry()||isMobile.iOS()||isMobile.Opera()||isMobile.Windows());
}
};
if(isMobile.any()) {
}
else {
$(expMain).on({
mouseenter: function() {
isPause=true;
},
mouseleave: function() {
isPause=false;
}
});
};
function startProgressbar() {
resetProgressbar();
percentTime=0;
isPause=false;
tick=setInterval(interval,10);
}
function interval() {
if(isPause===false) {
percentTime+=1/(time+0.1);
$bar.css({
width: percentTime+"%"
});
if(percentTime>=100) {
$slick.slick('slickNext');
startProgressbar();
}
}
}
function resetProgressbar() {
$bar.css({
width: 0+'%'
});
clearTimeout(tick);
}
startProgressbar();
});