jQuery(document).ready(function($) { //**************************************************************************** jQuery('.btn-backTop').on("click", function() { jQuery('html, body').animate({ scrollTop: 0 }, 800); return false; }); //**************************************************************************** var width = $('.g-recaptcha').parent().width(); if (width < 302) { var scale = width / 302; $('.g-recaptcha').css('transform', 'scale(' + scale + ')'); $('.g-recaptcha').css('-webkit-transform', 'scale(' + scale + ')'); $('.g-recaptcha').css('transform-origin', '0 0'); $('.g-recaptcha').css('-webkit-transform-origin', '0 0'); } //**************************************************************************** /*animations*/ jQuery(function($) { var doAnimations = function() { var offset = $(window).scrollTop() + $(window).height(), $animatables = $('.animatable'); if ($animatables.size() == 0) { $(window).off('scroll', doAnimations); } $animatables.each(function(i) { var $animatable = $(this); if (($animatable.offset().top + $animatable.height() - 20) < offset) { $animatable.removeClass('animatable').addClass('animated'); } }); }; $(window).on('scroll', doAnimations); $(window).trigger('scroll'); }); $(window).resize(function () { var viewportWidth = $(window).width(); if (viewportWidth < 600) { $(".fa-track-shipment").removeClass("fieldst-account").addClass("track-mobile"); } }); $('.accordion-toggle').click(function(){ $('.mw-collapse').slideToggle(); }); $('.contact_icon').click(function(){ $('.abc').slideToggle(); }); //**************************************************************************** /*Partners Logo*/ $('.customer-logos').slick({ slidesToShow: 7, slidesToScroll: 1, autoplay: true, autoplaySpeed: 2000, arrows: false, dots: false, pauseOnHover: false, responsive: [{ breakpoint: 768, settings: { slidesToShow: 4 } }, { breakpoint: 520, settings: { slidesToShow: 3 } }] }); var appendthis = (""); $('a[data-modal-id]').click(function(e) { e.preventDefault(); $("body").append(appendthis); $(".modal-overlay").fadeTo(500, 0.7); //$(".js-modalbox").fadeIn(500); var modalBox = $(this).attr('data-modal-id'); $('#'+modalBox).fadeIn($(this).data()); }); $(".js-modal-close, .modal-overlay").click(function() { $(".modal-box, .modal-overlay").fadeOut(500, function() { $(".modal-overlay").remove(); }); }); $(window).resize(function() { $(".modal-box").css({ top: ($(window).height() - $(".modal-box").outerHeight()) / 2, left: ($(window).width() - $(".modal-box").outerWidth()) / 2 }); }); $(window).resize(); //**************************************************************************** $('.carousel').carousel({ interval: 5000 }) $('#track_shipment').submit(function() { var $= jQuery.noConflict(); var shipment_number=$('#shipment_number').val(); var url_tmp="track_shipment.php?ship_no="+shipment_number; //var url = "http://localhost:8084/"+url_temp; var url = "https://www.techtransport.com/"+url_tmp; $.fancybox.showActivity(); $.fancybox({ 'transitionIn' : 'elastic', 'transitionOut' : 'elastic', 'speedIn' : 600, 'speedOut' : 200, 'overlayShow' : true, 'href' : url, 'type' : 'iframe', 'width' : 820, 'height' : 800, 'hideOnOverlayClick' : false }); return false; }); $(window).scroll(function() { if ($(this).scrollTop() > 63){ $('.main-navigation').addClass('fixed'); } else { $('.main-navigation').removeClass('fixed'); } }); }); $('#myshipmentstable').wrap('
');