// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification // for details on configuring this project to bundle and minify static web assets. // Write your JavaScript code. // header fixed $(window).scroll(function () { var scroll = $(window).scrollTop(); if (scroll >= 200) { $("header").addClass("fixedHd"); } else { $("header").removeClass("fixedHd"); } }); // Tooltip $(function () { $('[data-toggle="tooltip"]').tooltip() }) // Menu Color // Banner Slider $('.bannerSec .owl-carousel').owlCarousel({ loop: true, margin: 10, dots: false, nav: true, mouseDrag: false, autoplay: true, animateOut: 'slideOutLeft', responsive: { 0: { items: 1 }, 600: { items: 1 }, 1000: { items: 1 } } }); // partner with us slider $('.partnerwithus .owl-carousel').owlCarousel({ loop: true, margin: 20, responsiveClass: true, responsive: { 0: { items: 1, nav: true }, 600: { items: 3, nav: false }, 1000: { items: 4, nav: true, loop: false } } }) $('.ourImpactPartners .owl-carousel').owlCarousel({ loop: true, margin: 0, responsiveClass: true, // navText: ["",""], responsive: { 0: { items: 1, nav: false }, 600: { items: 3, nav: false }, 1000: { items: 5, nav: false, loop: false } } }) // awards Sec us slider $('.awardsSec .owl-carousel').owlCarousel({ loop: true, margin: 20, responsiveClass: true, // navText: ["",""], responsive: { 0: { items: 1, nav: true }, 600: { items: 3, nav: false }, 1000: { items: 5, nav: true, loop: false } } }) // testimonials Sec Sec us slider //var owl = $('.testimonialsSec .owl-carousel'); //owl.owlCarousel({ // items: 2, // loop: true, // margin: 10, // autoplay: true, // autoplayTimeout: 1000, // autoplayHoverPause: true //}); //$('.play').on('click', function () { // owl.trigger('autoplay.play.owl', [1000]) //}) //$('.stop').on('click', function () { // owl.trigger('autoplay.stop.owl') //}) $('.testimonialsSec .owl-carousel').owlCarousel({ loop: false, margin: 20, responsiveClass: true, autoplay: true, autoplayTimeout: 1000, autoplayHoverPause: true, responsive: { 0: { items: 1, nav: true }, 600: { items: 1, nav: false }, 1000: { items: 2, nav: true, loop: false } } }) // about Sec us slider $('.aboutSec .owl-carousel').owlCarousel({ loop: true, margin: 20, responsiveClass: true, // navText: ["",""], responsive: { 0: { items: 1, nav: true }, 600: { items: 1, nav: false }, 1000: { items: 1, nav: true, loop: false } } }) var sync1 = $(".slider"); var sync2 = $(".navigation-thumbs"); var thumbnailItemClass = '.owl-item'; var slides = sync1.owlCarousel({ video: true, startPosition: 12, items: 1, loop: true, margin: 10, mouseDrag: true, autoplayHoverPause: true, animateIn: "slideInDown", touchDrag: true, autoplay: true, autoplayTimeout: 3000, nav: true, dots: false }).on('changed.owl.carousel', syncPosition); function syncPosition(el) { $owl_slider = $(this).data('owl.carousel'); var loop = $owl_slider.options.loop; if (loop) { 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; } } else { var current = el.item.index; } var owl_thumbnail = sync2.data('owl.carousel'); var itemClass = "." + owl_thumbnail.options.itemClass; var thumbnailCurrentItem = sync2 .find(itemClass) .removeClass("synced") .eq(current); thumbnailCurrentItem.addClass('synced'); if (!thumbnailCurrentItem.hasClass('active')) { var duration = 300; sync2.trigger('to.owl.carousel', [current, duration, true]); } } var thumbs = sync2.owlCarousel({ startPosition: 12, items: 6, loop: false, margin: 10, autoplay: false, nav: true, autoplayHoverPause: true, dots: false, onInitialized: function (e) { var thumbnailCurrentItem = $(e.target).find(thumbnailItemClass).eq(this._current); thumbnailCurrentItem.addClass('synced'); }, }) .on('click', thumbnailItemClass, function (e) { e.preventDefault(); var duration = 300; var itemIndex = $(e.target).parents(thumbnailItemClass).index(); sync1.trigger('to.owl.carousel', [itemIndex, duration, true]); }).on("changed.owl.carousel", function (el) { var number = el.item.index; $owl_slider = sync1.data('owl.carousel'); $owl_slider.to(number, 100, true); }); // Animate On Scroll AOS.init(); //Check to see if the window is top if not then display button $(window).scroll(function () { if ($(this).scrollTop() > 500) { $('#toTop a').fadeIn(); } else { $('#toTop a').fadeOut(); } }); //Click event to scroll to top $('#toTop a').click(function () { $('html, body').animate({ scrollTop: 0 }, 600); return false; }); // menu $('.toggle_menu').click(function () { $('.kite-menu-trigger').toggleClass('active'); $('.sideBar_menu').toggleClass('active'); }); // count To $(document).ready(function () { $('#lightgallery').lightGallery(); }); // tab function openCity(evt, cityName) { var i, tabcontent, tablinks; tabcontent = document.getElementsByClassName("tabcontent"); for (i = 0; i < tabcontent.length; i++) { tabcontent[i].style.display = "none"; } tablinks = document.getElementsByClassName("tablinks"); for (i = 0; i < tablinks.length; i++) { tablinks[i].className = tablinks[i].className.replace(" active", ""); } document.getElementById(cityName).style.display = "block"; evt.currentTarget.className += " active"; } $(function () { $('button[data-toggle="ajax-modal"]').click(function (event) { // url to Razor Pages handler which returns modal HTML var url = '/Public/Career?handler=PartialModalPopup'; $.get(url).done(function (data) { // append HTML to document, find modal and show it $(document.body).append(data).find('.modal').modal('show'); }); }); //$('#submitButton').click(function (event) { // debugger; // var form = $('.jobModalForm')[0]; // // url to Razor Pages handler which returns modal HTML // var url = '/Public/Career?handler=PartialModalPopup'; // $.post(url, { // name: $(form).val(), // name2: $(form).val() // }).done(function (data) { // //// append HTML to document, find modal and show it // //$(document.body).append(data).find('.modal').modal('show'); // }); //}); });