mirror of
https://github.com/codeninjasuk/showcase.git
synced 2024-12-01 11:47:08 -05:00
41 lines
No EOL
1.1 KiB
JavaScript
41 lines
No EOL
1.1 KiB
JavaScript
|
|
(function ($) {"use strict";
|
|
|
|
$(function () {
|
|
var header = $(".start-style");
|
|
$(window).scroll(function () {
|
|
var scroll = $(window).scrollTop();
|
|
|
|
if (scroll >= 10) {
|
|
header.removeClass('start-style').addClass("scroll-on");
|
|
} else {
|
|
header.removeClass("scroll-on").addClass('start-style');
|
|
}
|
|
});
|
|
});
|
|
|
|
//Animation
|
|
|
|
$(document).ready(function () {
|
|
$('body.hero-anime').removeClass('hero-anime');
|
|
});
|
|
|
|
//Menu On Hover
|
|
|
|
$('body').on('mouseenter mouseleave', '.nav-item', function (e) {
|
|
if ($(window).width() > 750) {
|
|
var _d = $(e.target).closest('.nav-item');_d.addClass('show');
|
|
setTimeout(function () {
|
|
_d[_d.is(':hover') ? 'addClass' : 'removeClass']('show');
|
|
}, 1);
|
|
}
|
|
});
|
|
|
|
|
|
|
|
})(jQuery);
|
|
|
|
// Blank Target External Links
|
|
$(document.links).filter(function() {
|
|
return this.hostname != window.location.hostname;
|
|
}).attr('target', '_blank'); |