shop/static/assets/js/main.js
/*----------------------------
	 24. Product Sticky Bottom Cart
    ------------------------------ */
24. Product Sticky Bottom Cart
24 . Product Sticky Bottom Cart
function sticky_cart(){
		window.onscroll = function() {
			if($(window).scrollTop()>145){
			  $('.header').addClass("stickyNav animated fadeIn");                   
			} else {
			  $('.header').removeClass("stickyNav fadeIn");              
			}
			$(window).scrollTop() > 600 && $(".stickyCart").length ? (
			$("body.template-product").css("padding-bottom", "70px"), 
			$(".stickyCart").slideDown()) : ($("body.template-product").css("padding-bottom", "0"), 
			$(".stickyCart").slideUp());
		}
		$(".stickyOptions .selectedOpt").on("click", function() {
			$(".stickyOptions ul").slideToggle("fast")
		}),
		$(".stickyOptions .vrOpt").on("click", function(e) {
			var t = $(this).attr("data-val"),
				s = $(this).attr("data-no"),
				a = $(this).text();
			$(".selectedOpt").text(a), $(".stickyCart .selectbox").val(t).trigger("change"), $(".stickyOptions ul").slideUp("fast"), this.productvariants = JSON.parse(document.getElementById("ProductJson-" + i).innerHTML), $(".stickyCart .product-featured-img").attr("src", this.productvariants.variants[s].featured_image.src.replace(/(\.[^\.]*$|$)/, "_60x60$&"))
		})
	}
function sticky_cart ( ) { window . onscroll = function ( ) { if ( $ ( window ) . scrollTop ( ) > 145 ) { $ ( '.header' ) . addClass ( "stickyNav animated fadeIn" ) ; } else { $ ( '.header' ) . removeClass ( "stickyNav fadeIn" ) ; } $ ( window ) . scrollTop ( ) > 600 && $ ( ".stickyCart" ) . length ? ( $ ( "body.template-product" ) . css ( "padding-bottom" , "70px" ) , $ ( ".stickyCart" ) . slideDown ( ) ) : ( $ ( "body.template-product" ) . css ( "padding-bottom" , "0" ) , $ ( ".stickyCart" ) . slideUp ( ) ) ; } $ ( ".stickyOptions .selectedOpt" ) . on ( "click" , function ( ) { $ ( ".stickyOptions ul" ) . slideToggle ( "fast" ) } ) , $ ( ".stickyOptions .vrOpt" ) . on ( "click" , function ( e ) { var t = $ ( this ) . attr ( "data-val" ) , s = $ ( this ) . attr ( "data-no" ) , a = $ ( this ) . text ( ) ; $ ( ".selectedOpt" ) . text ( a ) , $ ( ".stickyCart .selectbox" ) . val ( t ) . trigger ( "change" ) , $ ( ".stickyOptions ul" ) . slideUp ( "fast" ) , this . productvariants = JSON . parse ( document . getElementById ( "ProductJson-" + i ) . innerHTML ) , $ ( ".stickyCart .product-featured-img" ) . attr ( "src" , this . productvariants . variants [ s ] . featured_image . src . replace ( / (\.[^\.]*$|$) / , "_60x60$&" ) ) } ) }
24.
24 .
/* Sticky Header */ /* End Sticky Header */