mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 21:24:59 +05:00
73 lines
No EOL
1.8 KiB
JavaScript
73 lines
No EOL
1.8 KiB
JavaScript
(function ($) {
|
|
"use strict";
|
|
|
|
/* ==============================================
|
|
ANIMATION -->
|
|
=============================================== */
|
|
|
|
new WOW({
|
|
boxClass: 'wow', // default
|
|
animateClass: 'animated', // default
|
|
offset: 0, // default
|
|
mobile: true, // default
|
|
live: true // default
|
|
}).init();
|
|
|
|
/* ==============================================
|
|
LIGHTBOX -->
|
|
=============================================== */
|
|
|
|
jQuery('a[data-gal]').each(function () {
|
|
jQuery(this).attr('rel', jQuery(this).data('gal'));
|
|
});
|
|
|
|
/* ==============================================
|
|
SCROLL -->
|
|
=============================================== */
|
|
|
|
$(function () {
|
|
$('a[href*=#]:not([href=#])').click(function () {
|
|
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
|
|
var target = $(this.hash);
|
|
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
|
|
if (target.length) {
|
|
$('html,body').animate({
|
|
scrollTop: target.offset().top
|
|
}, 1000);
|
|
return false;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
/* ==============================================
|
|
SCROLLSPY -->
|
|
=============================================== */
|
|
|
|
$('body').scrollspy({
|
|
target: '.docs-sidebar'
|
|
});
|
|
|
|
$('[data-spy="scroll"]').each(function () {
|
|
var $spy = $(this).scrollspy('refresh')
|
|
})
|
|
|
|
/* ==============================================
|
|
VIDEO FIX -->
|
|
=============================================== */
|
|
|
|
$(document).ready(function () {
|
|
// Target your .container, .wrapper, .post, etc.
|
|
$(".media").fitVids();
|
|
});
|
|
|
|
/* ==============================================
|
|
VIDEO FIX -->
|
|
=============================================== */
|
|
|
|
$('.docs-sidebar>nav>li>a').click(function () {
|
|
$('.docs-sidebar>nav>li').removeClass('active');
|
|
$(this).parent().addClass('active');
|
|
});
|
|
|
|
})(jQuery); |