📍 /home/diasdiamonds/public_html/webroot/js
📝 Editando: main.js
function changeSearch(e) { $("#search-box").val(e), $("#suggesstion-box").hide(); } $(document).on("change", ".currencyselector", function () { $(this).closest("form").submit(); }), $(document).ready(function () { $("#cbp-ntaccordion").cbpNTAccordion(), $(".filter").click(function () { $(".filterbar-panel").fadeIn("slow"); }), $(".closefilter").on("click", function () { $(".filterbar-panel").fadeOut("slow"); }), $(".plus-btn").on("click", function () { var e = document.getElementById("maxquantity").value, a = parseFloat($("#qty").val()); a < e && $("#qty").val(a + 1); }), $(".minus-btn").on("click", function () { var e = parseFloat($("#qty").val()); 1 != e && $("#qty").val(e - 1); }), $(".scroll-top-arrow").on("click", function () { return $("html, body").animate({ scrollTop: 0 }, "slow"), !1; }), $(".top-strip").owlCarousel({ loop:true, nav:false, center:false, pagination:false, autoplay: true, autoplayHoverPause: true, autoplaySpeed: 550, items: 1, autoPlay : 5000, animateOut: 'fadeOut', itemsDesktop : [1199,1], itemsDesktopSmall : [980,1], itemsTablet: [768,1], itemsMobile : [479,1], navigationText: ["<i class='icon icon-left-arrows'></i>","<i class='icon icon-right-arrows'></i>"], }); $(".banner").owlCarousel({ loop:true, nav:false, center:false, pagination:false, autoplay: true, autoplayHoverPause: true, autoplaySpeed: 550, items: 1, autoPlay : 5000, animateOut: 'fadeOut', itemsDesktop : [1199,1], itemsDesktopSmall : [980,1], itemsTablet: [768,1], itemsMobile : [479,1], navigationText: ["<i class='icon icon-left-arrows'></i>","<i class='icon icon-right-arrows'></i>"], }); $(".bannermobile").owlCarousel({ loop:true, nav:false, center:false, pagination:false, autoplay: true, autoplayHoverPause: true, autoplaySpeed: 550, items: 1, autoPlay : 5000, animateOut: 'fadeOut', itemsDesktop : [1199,1], itemsDesktopSmall : [980,1], itemsTablet: [768,1], itemsMobile : [479,1], navigationText: ["<i class='icon icon-left-arrows'></i>","<i class='icon icon-right-arrows'></i>"], }); $(".sub-category").owlCarousel({ loop:true, navigation:false, center:false, pagination:true, autoplay: true, autoplayHoverPause: true, autoplaySpeed: 550, items: 5, autoPlay : 5000, animateOut: 'fadeOut', itemsDesktop : [1199,5], itemsDesktopSmall : [980,2], itemsTablet: [768,2], itemsMobile : [479,2], navigationText: ["<i class='icon icon-left-arrows'></i>","<i class='icon icon-right-arrows'></i>"], }); $(".home-shape").owlCarousel({ loop:true, navigation:false, center:false, pagination:true, autoplay: true, autoplayHoverPause: true, autoplaySpeed: 550, items: 7, autoPlay : 5000, animateOut: 'fadeOut', itemsDesktop : [1199,7], itemsDesktopSmall : [980,3], itemsTablet: [768,3], itemsMobile : [479,2], navigationText: ["<i class='icon icon-left-arrows'></i>","<i class='icon icon-right-arrows'></i>"], }); $(".new-arrival").owlCarousel({ loop:true, navigation:false, center:false, pagination:true, autoplay: true, autoplayHoverPause: true, autoplaySpeed: 550, items: 4, autoPlay : 5000, animateOut: 'fadeOut', itemsDesktop : [1199,4], itemsDesktopSmall : [980,3], itemsTablet: [768,2], itemsMobile : [479,2], navigationText: ["<i class='icon icon-left-arrows'></i>","<i class='icon icon-right-arrows'></i>"], }); $(".most-loved").owlCarousel({ loop:true, navigation:false, center:false, pagination:true, autoplay: true, autoplayHoverPause: true, autoplaySpeed: 550, items: 5, autoPlay : 5000, animateOut: 'fadeOut', itemsDesktop : [1199,5], itemsDesktopSmall : [980,3], itemsTablet: [768,2], itemsMobile : [479,2], navigationText: ["<i class='icon icon-left-arrows'></i>","<i class='icon icon-right-arrows'></i>"], }); $(".recent-viewed").owlCarousel({ loop:true, navigation:false, center:false, pagination:true, autoplay: true, autoplayHoverPause: true, autoplaySpeed: 550, items: 5, autoPlay : 5000, animateOut: 'fadeOut', itemsDesktop : [1199,5], itemsDesktopSmall : [980,3], itemsTablet: [768,2], itemsMobile : [479,2], navigationText: ["<i class='icon icon-left-arrows'></i>","<i class='icon icon-right-arrows'></i>"], }); $(".our-store-carsole").owlCarousel({ loop:true, nav:false, center:false, pagination:true, autoplay: true, autoplayHoverPause: true, autoplaySpeed: 550, items: 1, autoPlay : 5000, animateOut: 'fadeOut', itemsDesktop : [1199,1], itemsDesktopSmall : [980,1], itemsTablet: [768,1], itemsMobile : [479,1], navigationText: ["<i class='icon icon-left-arrows'></i>","<i class='icon icon-right-arrows'></i>"], }); $(".product-banner").owlCarousel({ loop:true, nav:false, center:false, pagination:false, autoplay: true, autoplayHoverPause: true, autoplaySpeed: 550, items: 1, autoPlay : 2000, animateOut: 'fadeOut', itemsDesktop : [1199,1], itemsDesktopSmall : [980,1], itemsTablet: [768,1], itemsMobile : [479,1], navigationText: ["<i class='icon icon-left-arrows'></i>","<i class='icon icon-right-arrows'></i>"], }); $(".testimonials").owlCarousel({ navigation: false, pagination: true, loop: true, items: 4, video:true, center:true, autoPlay : 3000, itemsDesktop : [1199,3], itemsDesktopSmall : [980,3], itemsTablet: [768,1], itemsTabletSmall: false, itemsMobile : [479,1], navigationText: ["<i class='icon icon-arrow-left'></i>","<i class='icon icon-arrow-right'></i>"] }); }), (function (a) { a.fn.meanmenu = function (Q) { var e = { meanMenuTarget: jQuery(this), meanMenuContainer: "body", meanMenuClose: "X", meanMenuCloseSize: "18px", meanMenuOpen: "<span /><span /><span />", meanRevealPosition: "right", meanRevealPositionDistance: "0", meanRevealColour: "", meanScreenWidth: "480", meanNavPush: "", meanShowChildren: !0, meanExpandableChildren: !0, meanExpand: "+", meanContract: "-", meanRemoveAttrs: !1, onePage: !1, meanDisplay: "block", removeElements: "", }; Q = a.extend(e, Q); var x = window.innerWidth || document.documentElement.clientWidth; return this.each(function () { var a = Q.meanMenuTarget, t = Q.meanMenuContainer, n = Q.meanMenuClose, i = Q.meanMenuCloseSize, o = Q.meanMenuOpen, s = Q.meanRevealPosition, e = Q.meanRevealPositionDistance, l = Q.meanRevealColour, r = Q.meanScreenWidth, c = Q.meanNavPush, u = ".meanmenu-reveal", m = Q.meanShowChildren, d = Q.meanExpandableChildren, h = Q.meanExpand, p = Q.meanContract, v = Q.meanRemoveAttrs, f = Q.onePage, $ = Q.meanDisplay, g = Q.removeElements, y = !1; function w() { var e; "center" === s && ((e = (window.innerWidth || document.documentElement.clientWidth) / 2 - 22 + "px"), (b = "left:" + e + ";right:auto;"), y ? jQuery(".meanmenu-reveal").animate({ left: e }) : jQuery(".meanmenu-reveal").css("left", e)); } (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/Blackberry/i) || navigator.userAgent.match(/Windows Phone/i)) && (y = !0), (navigator.userAgent.match(/MSIE 8/i) || navigator.userAgent.match(/MSIE 7/i)) && jQuery("html").css("overflow-y", "scroll"); var b = "", C = !1, k = !1; function j() { jQuery(".mean-bar,.mean-push").remove(), jQuery(t).removeClass("mean-container"), jQuery(a).css("display", $), (k = C = !1), jQuery(g).removeClass("mean-remove"); } function T() { var e = "background:" + l + ";color:" + l + ";" + b; x <= r ? (jQuery(g).addClass("mean-remove"), (k = !0), jQuery(t).addClass("mean-container"), jQuery(".mean-container").prepend('<div class="mean-bar"><a href="#nav" class="meanmenu-reveal" style="' + e + '">Show Navigation</a><nav class="mean-nav"></nav></div>'), (e = jQuery(a).html()), jQuery(".mean-nav").html(e), v && jQuery("nav.mean-nav ul, nav.mean-nav ul *").each(function () { jQuery(this).is(".mean-remove") ? jQuery(this).attr("class", "mean-remove") : jQuery(this).removeAttr("class"), jQuery(this).removeAttr("id"); }), jQuery(a).before('<div class="mean-push" />'), jQuery(".mean-push").css("margin-top", c), jQuery(a).hide(), jQuery(".meanmenu-reveal").show(), jQuery(u).html(o), (S = jQuery(u)), jQuery(".mean-nav ul").hide(), m ? d ? (jQuery(".mean-nav ul ul").each(function () { jQuery(this).children().length && jQuery(this, "li:first") .parent() .append('<a class="mean-expand" href="#" style="">' + h + "</a>"); }), jQuery(".mean-expand").on("click", function (e) { e.preventDefault(), jQuery(this).hasClass("mean-clicked") ? (jQuery(this).text(h), jQuery(this) .prev("ul") .slideUp(300, function () {})) : (jQuery(this).text(p), jQuery(this) .prev("ul") .slideDown(300, function () {})), jQuery(this).toggleClass("mean-clicked"); })) : jQuery(".mean-nav ul ul").show() : jQuery(".mean-nav ul ul").hide(), jQuery(".mean-nav ul li").last().addClass("mean-last"), S.removeClass("meanclose"), jQuery(S).click(function (e) { e.preventDefault(), (C = !1 === C ? (S.css("text-align", "center"), S.css("text-indent", "0"), S.css("font-size", i), jQuery(".mean-nav ul:first").slideDown(), !0) : (jQuery(".mean-nav ul:first").slideUp(), !1)), S.toggleClass("meanclose"), S.html(jQuery(S).is(".meanmenu-reveal.meanclose") ? n : o), jQuery(g).addClass("mean-remove"); }), f && jQuery(".mean-nav ul > li > a:first-child").on("click", function () { jQuery(".mean-nav ul:first").slideUp(), (C = !1), jQuery(S).toggleClass("meanclose").html(o); })) : j(); } "right" === s && (b = "right:" + e + ";left:auto;"), "left" === s && (b = "left:" + e + ";right:auto;"), w(); var S = ""; y || jQuery(window).resize(function () { (x = window.innerWidth || document.documentElement.clientWidth), j(), x <= r ? (T(), w()) : j(); }), jQuery(window).resize(function () { (x = window.innerWidth || document.documentElement.clientWidth), y ? (w(), x <= r ? !1 === k && T() : j()) : (j(), x <= r && (T(), w())); }), T(); }); }; })(jQuery), (function ($) { var mainMenuNav = $('.main-menu'); mainMenuNav.meanmenu({ meanScreenWidth: '991', meanMenuContainer: '.mobile-menu', meanMenuClose: '<span class="menu-close"></span>', meanMenuOpen: '<span class="menu-bar"></span>', meanRevealPosition: 'right', meanMenuCloseSize: '0', }); })(jQuery); $(".mega-menu-item").hover(function(){ $original=$('.menu-picture-target').attr('src'); $(".menu-picture-target").attr('src', 'img/'+this.id); }, function(){ $(".menu-picture-target").attr('src', $original); //$(this).css("background-color", "white"); }); $(window).on('scroll', function() { var scroll = $(window).scrollTop(); if (scroll < 150) { $('.header-bar').removeClass('is-sticky'); }else{ $('.header-bar').addClass('is-sticky'); } }); jQuery("#slideshow > p:gt(0)").hide(), setInterval(function () { jQuery("#slideshow > p:first").fadeOut(1e3).next().fadeIn(1e3).end().appendTo("#slideshow"); }, 3e3), $(document).on("change", ".radiobox", function () { return $("#filter").serialize(), $(this).attr("action"), $("#filter").submit(), !1; }), $(document).on("change", ".check", function () { return $("#filter").serialize(), $(this).attr("action"), $("#filter").submit(), !1; }), $("#pincode").on("keydown", function (e) { if (e.shiftKey) return !1; var a = e.which; (47 < a && a < 58) || (95 < a && a < 106) || 8 == a || 9 == a || 110 == a || 190 == a || e.preventDefault(); }), $("#mobile").on("keydown", function (e) { if (e.shiftKey) return !1; var a = e.which; (47 < a && a < 58) || (95 < a && a < 106) || 8 == a || 9 == a || 110 == a || 190 == a || e.preventDefault(); }), $("#mobile").keypress(function (e) { 10 <= this.value.length && e.preventDefault(); }), $(window).scroll(function () { $(".thumbnail").length && ($(".thumbnail a").removeClass("active"), $(this).scrollTop() <= $('div[data-anchor="product1"]').offset().top && ($(".thumbnail a").removeClass("active"), $(".thumbnail a:eq(0)").addClass("active")), 0 < $("#product2").length && $(this).scrollTop() >= $('div[data-anchor="product2"]').offset().top && ($(".thumbnail a").removeClass("active"), $(".thumbnail a:eq(1)").addClass("active")), 0 < $("#product3").length && $(this).scrollTop() >= $('div[data-anchor="product3"]').offset().top && ($(".thumbnail a").removeClass("active"), $(".thumbnail a:eq(2)").addClass("active")), 0 < $("#product4").length && $(this).scrollTop() >= $('div[data-anchor="product4"]').offset().top && ($(".thumbnail a").removeClass("active"), $(".thumbnail a:eq(3)").addClass("active")), 0 < $("#product5").length && $(this).scrollTop() >= $('div[data-anchor="product5"]').offset().top && ($(".thumbnail a").removeClass("active"), $(".thumbnail a:eq(4)").addClass("active")), 0 < $("#product6").length && $(this).scrollTop() >= $('div[data-anchor="product6"]').offset().top && ($(".thumbnail a").removeClass("active"), $(".thumbnail a:eq(5)").addClass("active"))); }), $(document).ready(function () { $(".thumbnail a").click(function () { if (location.pathname.replace(/^\//, "") == this.pathname.replace(/^\//, "") && location.hostname == this.hostname) { var e = $(this.hash); if ((e = e.length ? e : $("[name=" + this.hash.slice(1) + "]")).length) return $("html,body").animate({ scrollTop: e.offset().top + 10 }, 1e3), !1; } }); }), $(document).ready(function () { window.matchMedia("(min-width: 767px)").matches && $(window).scroll(function (e) { var a = $(this).scrollTop(), t = $(".product-panel").height(), n = $(".productdescription").width(); $(".productdescription").css("height", t), a < 150 && ($(".scroller").removeClass("relative"), $(".scroller").removeClass("fixed")), 150 < a && a < t - 540 ? ($(".scroller").removeClass("relative").addClass("fixed"), $(".scroller").css("width", n)) : t - 540 < a && ($(".scroller").removeClass("fixed").addClass("relative"), $(".scroller").css("width", n)); }); }), $('[data-fancybox="images"]').fancybox({ fullScreen: { autoStart: !0 } }), $(document).ready(function () { $("#search-box").keyup(function () { $.ajax({ type: "POST", url: window.location.origin + "/products/searchsuggestion/" + $(this).val(), beforeSend: function () {}, success: function (e) { $("#suggesstion-box").show(), $("#suggesstion-box").html(e); }, }); }); }), $(document).on("change", ".radiobox", function () { return $("#filter").serialize(), $(this).attr("action"), $("#filter").submit(), !1; }), $(document).on("change", ".check", function () { return $("#filter").serialize(), $(this).attr("action"), $("#filter").submit(), !1; }), $(document).on("change", ".sortby", function () { return $("#filter").serialize(), $(this).attr("action"), $("#filter").submit(), !1; }), $(document).ready(function () { $(".show-password, .hide-password").on("click", function () { $(this).hasClass("show-password") ? ($("#password").attr("type", "text"), $(this).parent().find(".show-password").hide(), $(this).parent().find(".hide-password").show()) : ($("#password").attr("type", "password"), $(this).parent().find(".hide-password").hide(), $(this).parent().find(".show-password").show()); }); }), $(document).on("click", ".addtocart", function () { var e = document.getElementById("mykey").value, a = document.getElementById("qty").value, t = $("input[name='size']:checked").val(); isNaN(a) && ((a = 1), (document.getElementById("qty").value = 1)), $('input[name="size"]:checked').val() ? $.ajax({ type: "POST", url: window.location.origin + "/products/addcart/" + e + "/" + a + "/" + t, beforeSend: function () {}, success: function (e) { $(".cartnav").html(e), $(".flash-message-cartadd").fadeIn(100), $(".flash-message-cartadd").fadeOut(10000); $(".addtocart").html('<a href="https://www.diasdiamonds.com/cart">Go to Cart</a>'); $('.addtocart').prop('disabled', false); }, }) : ($(".selectsize").animate({ left: "10%", margin: "0 10%" }, 500), $(".selectsize").animate({ left: "0", margin: "15px 0px" }, 500), $(".flash-message-size").fadeIn("slow"), window.navigator.vibrate(200)); }); $(document).on("click", ".submit-cart", function () { var e = document.getElementById("mykey").value, a = document.getElementById("qty").value, t = $("input[name='size']:checked").val(); isNaN(a) && ((a = 1), (document.getElementById("qty").value = 1)), $('input[name="size"]:checked').val() ? $.ajax({ type: "POST", url: window.location.origin + "/products/addcart/" + e + "/" + a + "/" + t, beforeSend: function () {}, success: function (e) { $(".cartnav").html(e), $(".flash-message-cartadd").fadeIn(100), $(".flash-message-cartadd").fadeOut(10000); $(".addtocart").html('<a href="https://www.diasdiamonds.com/cart">Go to Cart</a>'); $(".submit-cart").html('<a href="https://www.diasdiamonds.com/cart">Go to Cart</a>'); }, }) : ($(".selectsize").animate({ left: "10%", margin: "0 10%" }, 500), $(".selectsize").animate({ left: "0", margin: "0" }, 500), $(".flash-message-size").fadeIn("slow"), window.navigator.vibrate(200)); document.getElementById("breadcrumb").scrollIntoView({ behavior: "smooth" }); }); $(document).on("change", ".choosesize", function () { $('.addtocart').prop('disabled', false); $(".flash-message-size").fadeOut(500); var e = document.getElementById("mykey").value, a = this.value; (document.getElementById("qty").value = 1), "" == this.value && (a = "empty"), $.ajax({ type: "POST", url: window.location.origin + "/products/variation/" + e + "/" + a, beforeSend: function () {}, success: function (e) { $(".price-replace").html(e); }, }); }); $(document).on("change", ".chooseaddress", function () { $.ajax({ type: "POST", url: window.location.origin + "/checkouts/changeaddress/" + this.id, beforeSend: function () {}, success: function (e) { $(".address-replace").html(e); }, }); }), $(".closepopup").on("click", function () { $(".cookies-terms").fadeOut("slow"); }), $(".acceptpopup").on("click", function () { $(".cookies-terms").fadeOut("slow"), setCookie("suifab", "cookies", "365"); }), $(document).ready(function () { $.cookie("suifab") || $(".cookies-terms").fadeIn("slow"); }), $(document).on("change", "#country", function () { $.ajax({ type: "POST", url: window.location.origin + "/checkouts/changestate/" + this.value, beforeSend: function () {}, success: function (e) { $(".change-state").html(e); }, }); }), $(document).on("click", ".paymentmode", function () { "COD" == this.value ? $(".flash-message-cod").fadeIn(500) : $(".flash-message-cod").fadeOut(500); }); (function ($) { $(window).on('scroll', function() { var scroll = $(window).scrollTop(); if (scroll < 600) { $('.mobile-product-cart-action').css("display", "none !important"); }else{ $('.mobile-product-cart-action').css("display", "block !important"); } }); })(jQuery); $(document).on("click", ".add-to-wishlist", function () { if ( $(this).hasClass("red") ) { $(this).removeClass('red'); $.ajax({ type: "POST", url: window.location.origin + "/products/removewishlist/" + this.id, beforeSend: function () {}, success: function (data) { $(".top-wishlist-icon").html(data); } }) }else{ $(this).addClass('red'); $.ajax({ type: "POST", url: window.location.origin + "/products/addwishlist/" + this.id, beforeSend: function () {}, success: function(data){ $(".top-wishlist-icon").html(data); if(data=='false'){ window.location.href=window.location.origin + "/sign-in"; } }, }) } }); $(function () { var $container = $("#posts-list"); $container.infinitescroll({ navSelector: ".next", // selector for the paged navigation nextSelector: ".next a", // selector for the NEXT link (to page 2) itemSelector: ".product-box", // selector for all items you'll retrieve debug: true, dataType: "html", loading: { finishedMsg: "No more products to load", img: "../img/loader.gif", }, }); }); !function(t){"use strict";function i(t,s){for(var i in s)s.hasOwnProperty(i)&&(t[i]=s[i]);return t}function s(t,s){this.el=t,this.options=i({},this.options),i(this.options,s),this._init()}s.prototype.options={start:0},s.prototype._init=function(){this.tabs=[].slice.call(this.el.querySelectorAll("ul > li")),this.items=[].slice.call(this.el.querySelectorAll(".content > section")),this.current=-1,this._show(),this._initEvents()},s.prototype._initEvents=function(){var i=this;this.tabs.forEach(function(t,s){t.addEventListener("click",function(t){t.preventDefault(),i._show(s)})})},s.prototype._show=function(t){0<=this.current&&(this.tabs[this.current].className="",this.items[this.current].className=""),this.current=null!=t?t:0<=this.options.start&&this.options.start<this.items.length?this.options.start:0,this.tabs[this.current].className="tab-current",this.items[this.current].className="content-current"},t.CBPFWTabs=s}(window),new CBPFWTabs(document.getElementById("tabs"));
[ Cancelar ]
Nome
Permissões
Ações
[ .. Voltar ]
📄 jquery-1.12.4.min.js
0644
[ EDITAR/VER ]
📄 jquery.infinitescroll.min.js
0644
[ EDITAR/VER ]
📄 main.js
0644
[ EDITAR/VER ]