Commit d217a522 authored by Mamtha Adepu's avatar Mamtha Adepu

Latest changes in script files

parent b7bd9b8f
This diff is collapsed.
function stickyCheck(){$(".affix-top").size()>0&&($(window).scrollTop()>=fixedTop?$(".affix-top").addClass("affix"):$(".affix-top").removeClass("affix"))}function is_touch_device(){return"ontouchstart"in window||navigator.maxTouchPoints}function displayPhoneNumber(n,t){if(console.log("occur"),$(window).width()>1024){var i=$("#callNumberArea");return console.log(n),i.html()==""?($("#callIcon").removeClass("fa-phone"),i.html(n)):(i.html(""),$("#callIcon").addClass("fa-phone")),t.preventDefault(),!1}}var fixedTop;$(document).ready(function(){var n,t;$(".row:not(.foot)").each(function(){var n=$(this),t=$(this).html();$.each(["Land O Lakes","Alpine Lace","ALPINE LACE","New Yorker","Naturally Slender","Fresh Buttery Taste"],function(i,r){n.html(t.split(r).join(""+r+"<sup>&reg;<\/sup>"));t=$(n).html()})});$(document).foundation();$(window).keydown(function(t){if(t.keyCode==13&&$(t.target).attr("id")=="siteSearch"&&$("input#siteSearch").val()!=n)if(t.preventDefault(),t.stopPropagation(),$("input#siteSearch").val().length<3&&$(".searchResults").size()==0)window.location.href="/search";else if($("input#siteSearch").val().length>2){$(".message").hide();var i="?product_name="+$("input#siteSearch").val();window.location.href="/search"+i}else $(".message").show()});$(document).on("click",".searchProducts",function(){if($("input#siteSearch").val()!=n)if($("input#siteSearch").val().length<3&&$(".searchResults").size()==0)window.location.href="/search";else if($("input#siteSearch").val().length>2){$(".message").hide();var t="?product_name="+$("input#siteSearch").val();window.location.href="/search"+t}else $(".message").show()});window.location.href.split("?")[1]!=undefined&&window.location.href.split("?")[0].indexOf("search")>=0?decodeURI(window.location.href.split("?")[1].split("=")[1])!=undefined&&decodeURI(window.location.href.split("?")[1].split("=")[0]).indexOf("product_name")>=0&&($(".productName").text(decodeURI(window.location.href.split("?")[1].split("=")[1])),$("input#siteSearch").attr("value",decodeURI(window.location.href.split("?")[1].split("=")[1]))):$(".productName").text("");window.location.href.split("?")[1]!=undefined&&(n=decodeURI(window.location.href.split("?")[1].split("=")[1]));$(".browse-tabs").on("change.zf.tabs",function(){Foundation.reInit("equalizer")});$("a.disSubcon").on("click",function(){$(this).closest("li").siblings().removeClass("active");$(this).closest("li").addClass("active");$("#other_info .showdata").html("");$("#other_info .showdata").html($(this).closest("li").find(".hideUl").html());$("#other_info .clickedData").show()});$(document).on("click","#otherInfo a.disSubcon",function(){$(window).width()<768&&($(".fa.fa-angle-left,#otherInfo #other_info").show(),$("#otherInfo").addClass("mobileView"),$(".product,#product-tabs,#otherInfo #otherInfo-List,.affix-top").hide())});$(document).on("click",".fa.fa-angle-left",function(){$(window).width()<768&&($(".product,#product-tabs,#otherInfo #otherInfo-List,.affix-top").show(),$("#otherInfo").removeClass("mobileView"),$(".fa.fa-angle-left,#otherInfo #other_info").hide())});$(document).not(".reveal-overlay").on("touchstart touchmove touchend",function(n){$("body").hasClass("is-reveal-open")&&n.preventDefault()});$(document).on("click",".revealData",function(){$("#modal-link").attr("value",$(this).attr("data-link"))});$(".affix-top").size()>0&&(fixedTop=$(".affix-top").offset().top);$(window).scroll(function(){stickyCheck()});$("#product-tabs").on("change.zf.tabs",function(){Foundation.reInit("equalizer")});t=$(window).width();$(window).resize(function(){var n=$(window).width(),i;n!==t&&(t=n,$(".affix-top").size()>0&&(i=$(".affix-top").offset().top))})})
\ No newline at end of file
......@@ -351,5 +351,7 @@
{{> body}}
{{> footer}}
<script src="{{root}}assets/js/app.js"></script>
<script src="{{root}}assets/js/main.js"></script>
<script src="{{root}}assets/js/jquery.js"></script>
</body>
</html>
{{> header}}
<section>
......@@ -6,7 +6,7 @@
<div class="row expanded product">
<div class="large-6 medium-6 small-6 columns product-detail">
<div class="product-brand">Land O Lakes<sup>®</sup></div>
<div class="product-brand">Land O Lakes</div>
<div class="product-name "><h1> Salted Extra Creamy Butter</h1></div>
<div class="product-weight">net wt. 1 lb</div>
</div>
......@@ -21,19 +21,24 @@
<div class="row expanded"><div class="affix-top">
<ul class="tabs" data-tabs="6uehne-tabs" id="product-tabs">
<li class="tabs-title product-detail-tab" role="presentation">
<a href="#nutrition" aria-selected="false" role="tab" aria-controls="nutrition" id="nutrition-label"><span class="fa fa-cutlery"></span><br>Nutrition</a>
<a href="#nutrition" aria-selected="false" role="tab" aria-controls="nutrition" id="nutrition-label">
<span class="fa fa-cutlery"></span>Nutrition</a>
</li>
<li class="tabs-title product-detail-tab" role="presentation">
<a href="#ingredients" role="tab" aria-controls="ingredients" aria-selected="false" id="ingredients-label"><span class="fa fa-list"></span><br>Ingredients</a>
<a href="#ingredients" role="tab" aria-controls="ingredients" aria-selected="false" id="ingredients-label">
<span class="fa fa-list"></span>Ingredients</a>
</li>
<li class="tabs-title product-detail-tab" role="presentation">
<a href="#allergens" role="tab" aria-controls="allergens" aria-selected="false" id="allergens-label"><span class="fa fa-exclamation-triangle"></span><br>Allergens</a>
<a href="#allergens" role="tab" aria-controls="allergens" aria-selected="false" id="allergens-label">
<span class="fa fa-exclamation-triangle"></span>Allergens</a>
</li>
<li class="tabs-title product-detail-tab" role="presentation">
<a href="#otherInfo" role="tab" aria-controls="otherInfo" aria-selected="false" id="otherInfo-label"><span class="fa fa-info-circle"></span><br>Other Information</a>
<a href="#otherInfo" role="tab" aria-controls="otherInfo" aria-selected="false" id="otherInfo-label">
<span class="fa fa-info-circle"></span>Other Information</a>
</li>
<li class="tabs-title product-detail-tab is-active" role="presentation">
<a href="#companyBrand" role="tab" aria-controls="companyBrand" aria-selected="true" id="companyBrand-label"><span class="fa fa-share-square"></span><br>Company / Brand</a>
<a href="#companyBrand" role="tab" aria-controls="companyBrand" aria-selected="true" id="companyBrand-label">
<span class="fa fa-share-square"></span>Company / Brand</a>
</li>
</ul>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment