$(window).on("load", function () { $(".preloader").fadeOut("slow"); }); $(document).ready(function () { "use strict"; /*--------------- Features Carousel ------------------ */ $(".features-carousel").owlCarousel({ loop: true, margin: 0, autoplay: true, responsiveClass: true, responsive: { 0: { items: 1, }, 600: { items: 2, }, 1000: { items: 3, }, }, }); /*--------------- Copy Email One Click ------------------ */ let clipboard = new ClipboardJS(".custom-email-botton"); $('[data-toggle="tooltip"]').tooltip(); /*--------------- Fetch All Messages ------------------ */ try { function messages() { var email = $("#trsh_mail"); var btn_copy = $(".custom-email-botton"); if (email.val().length == 0) { btn_copy.attr("disabled", "disabled"); email.val("landing"); var myLand = setInterval(function () { var val = ""; switch (email.val()) { case "landing": val = "landing."; break; case "landing.": val = "landing.."; break; case "landing..": val = "landing..."; break; case "landing...": val = "landing"; break; } email.val(val); }, 300); } $.ajax({ url: url, dataType: "text", cache: false, contentType: false, processData: false, type: "get", success: function (data) { clearInterval(myLand); btn_copy.removeAttr("disabled"); Progress.configure({ color: [color] }); Progress.configure({ speed: 0.8 }); Progress.complete(); var d = JSON.parse(data); email.val(d.mailbox); if (d.messages.length > 0) { $("#mailbox").html(""); } $.each(d.messages, function (key, value) { var is_seen = ""; if (!value.is_seen) { is_seen = 'new'; } $("#mailbox").append( '