Spaces:
Running
Running
File size: 2,706 Bytes
a16c8ec | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | /* ---------------------------------------------------
Theme Name: Anime
Description: Anime video tamplate
Author: Colorib
Author URI: https://colorib.com/
Version: 1.0
Created: Colorib
--------------------------------------------------------- */
'use strict';
(function ($) {
/*------------------
Preloader
--------------------*/
$(window).on('load', function () {
$(".loader").fadeOut();
$("#preloder").delay(200).fadeOut("slow");
/*------------------
FIlter
--------------------*/
$('.filter__controls li').on('click', function () {
$('.filter__controls li').removeClass('active');
$(this).addClass('active');
});
if ($('.filter__gallery').length > 0) {
var containerEl = document.querySelector('.filter__gallery');
var mixer = mixitup(containerEl);
}
});
/*------------------
Background Set
--------------------*/
$('.set-bg').each(function () {
var bg = $(this).data('setbg');
$(this).css('background-image', 'url(' + bg + ')');
});
// Search model
$('.search-switch').on('click', function () {
$('.search-model').fadeIn(400);
});
$('.search-close-switch').on('click', function () {
$('.search-model').fadeOut(400, function () {
$('#search-input').val('');
});
});
/*------------------
Navigation
--------------------*/
$(".mobile-menu").slicknav({
prependTo: '#mobile-menu-wrap',
allowParentLinks: true
});
/*------------------
Hero Slider
--------------------*/
var hero_s = $(".hero__slider");
hero_s.owlCarousel({
loop: true,
margin: 0,
items: 1,
dots: true,
nav: true,
navText: ["<span class='arrow_carrot-left'></span>", "<span class='arrow_carrot-right'></span>"],
animateOut: 'fadeOut',
animateIn: 'fadeIn',
smartSpeed: 1200,
autoHeight: false,
autoplay: true,
mouseDrag: false
});
/*------------------
Video Player
--------------------*/
const player = new Plyr('#player', {
controls: ['play-large', 'play', 'progress', 'current-time', 'mute', 'captions', 'settings', 'fullscreen'],
seekTime: 25
});
/*------------------
Niceselect
--------------------*/
$('select').niceSelect();
/*------------------
Scroll To Top
--------------------*/
$("#scrollToTopButton").click(function() {
$("html, body").animate({ scrollTop: 0 }, "slow");
return false;
});
})(jQuery); |