| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/v2.hellogtx.com/backup/public/js/ |
Upload File : |
/* -------------------------------------
CUSTOM FUNCTION WRITE HERE
-------------------------------------- */
"use strict";
jQuery(document).on('ready', function() {
/* -------------------------------------
SCROLLBAR
-------------------------------------- */
// jQuery('.tg-themescrollbar').mCustomScrollbar({
// axis:"y",
// });
/* -------------------------------------
HOME BANNER SLIDER
-------------------------------------- */
var _tg_homeslider = jQuery('#tg-homeslider');
_tg_homeslider.owlCarousel({
items: 1,
loop: true,
dots: true,
nav: false,
autoplay: true,
animateIn: 'fadeIn',
animateOut: 'fadeOut',
navText: [
'<i class="icon-chevron-left"></i>',
'<i class="icon-chevron-right"></i>',
],
navClass: [
'tg-btnroundprev',
'tg-btnroundnext'
],
});
jQuery('.owl-carousel').mouseover(function(){
_tg_homeslider.trigger('stop.owl.autoplay');
});
jQuery('.owl-carousel').mouseleave(function(){
_tg_homeslider.trigger('play.owl.autoplay',[1000]);
});
/* -------------------------------------
TESTIMONIALS SLIDER
-------------------------------------- */
var sync1 = jQuery("#tg-homesliderfull");
var sync2 = jQuery("#tg-homesliderthumbnails");
var slidesPerPage = 5;
var syncedSecondary = true;
sync1.owlCarousel({
items : 1,
loop: true,
nav: false,
dots: false,
autoplay: true,
slideSpeed : 2000,
responsiveRefreshRate : 200,
navText: [
'<i class="icon-chevron-left"></i>',
'<i class="icon-chevron-right"></i>',
],
}).on('changed.owl.carousel', syncPosition);
sync2.on('initialized.owl.carousel', function () {
sync2.find(".owl-item").eq(0).addClass("current");
})
.owlCarousel({
items : slidesPerPage,
dots: false,
nav: false,
margin: 0,
smartSpeed: 200,
slideSpeed : 500,
slideBy: slidesPerPage,
responsiveRefreshRate : 100,
responsiveClass:true,
responsive:{
0:{
items:1,
},
480:{
items:2,
},
640:{
items:3,
},
800:{
items:4,
},
1200:{
items:5,
}
}
}).on('changed.owl.carousel', syncPosition2);
function syncPosition(el) {
var count = el.item.count-1;
var current = Math.round(el.item.index - (el.item.count/2) - .5);
if(current < 0) {
current = count;
}
if(current > count) {
current = 0;
}
sync2.find(".owl-item").removeClass("current").eq(current).addClass("current")
var onscreen = sync2.find('.owl-item.active').length - 1;
var start = sync2.find('.owl-item.active').first().index();
var end = sync2.find('.owl-item.active').last().index();
if (current > end) {
sync2.data('owl.carousel').to(current, 100, true);
}
if (current < start) {
sync2.data('owl.carousel').to(current - onscreen, 100, true);
}
}
function syncPosition2(el) {
if(syncedSecondary) {
var number = el.item.index;
sync1.data('owl.carousel').to(number, 100, true);
}
}
sync2.on("click", ".owl-item", function(e){
e.preventDefault();
var number = jQuery(this).index();
sync1.data('owl.carousel').to(number, 300, true);
});
});