This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
var selection = $('select').text().trim(); | |
var featured = ["Art Prints", | |
"Postcards"]; | |
for(var i = 0; i < featured.length; i++){ | |
if( selection !== featured[i] ){ | |
// do something, in my case... | |
$('.frames').hide(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// anchor links offset | |
$('a[href^="#"]').click(function() { | |
var target = $(this.hash); | |
if (target.length == 0) target = $('a[name="' + this.hash.substr(1) + '"]'); | |
if (target.length == 0) target = $('html'); | |
$('html, body').animate({ scrollTop: target.offset().top-170 }, 1000); | |
return false; | |
}); | |
// Might need a mobile query to handle a different offset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isMobile(){ | |
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) { | |
return true; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Client logos | |
var logoEls = $('.social-proofs .clientLogo'), | |
logoCount = logoEls.size(), | |
unusedLogos = [{ | |
src: 'img/companies-we-represent/house-of-raeford.png', | |
alt: 'YOUR COMPANY serves House of Raeford' | |
}, { | |
src: 'img/companies-we-represent/pictsweet.png', | |
alt: 'YOUR COMPANY serves Pict-Sweet' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="summary_block"> | |
<h3 id="title-price" content="574.8">Books - $574.80</h3> | |
<form action="/cart/add" method="post" enctype="multipart/form-data" id="AddToCartForm"> | |
<div class="quantity"> | |
<div class="filter_cnt pull-left"> | |
<label for="Quantity">Quantity</label> | |
<div class="filter"> | |
<select id="Quantity" name="quantity" class="selectpicker" tabindex="-98"> | |
<option value="1">1</option> | |
<option value="2">2</option> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$( document ).ready(function() { | |
$("ul.tabs li").click(function(e){ | |
e.preventDefault(); | |
if(!$("this a").hasClass("active")){ | |
nthContent = $(this).index(); | |
nthContent += 1; | |
// remove active class from tabs and content | |
$("ul.tabs li a.active, .content.active").removeClass("active"); | |
// add active class to tab and content | |
$("this a").addClass("active"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// list featured collections in opposite order desired | |
var featured = ['Metal Signs', | |
'Canvas Prints', | |
'Gallery Prints']; | |
var ul = $(".list"); | |
for(var i = 0; i < featured.length; i++){ | |
ul.prepend( $( ".list li:contains('" + featured[i] + "')" ) ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p class="copyright">Copyright © 2012 - <script type="text/javascript">var currentTime = new Date();var year = currentTime.getFullYear();document.write(year);</script> Your Company Name, Inc. / All rights reserved.</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const loc = window.location; | |
if (loc.search.includes('utm')) { | |
if (window.history.replaceState) { | |
history.replaceState({}, '', loc.pathname); | |
} | |
else { | |
loc.hash = ''; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// // wrap all iFrames, except those with an id of #noOverlay | |
$('iframe').not( document.getElementById( "noOverlay" ) ).wrap('<div class="overlayiFrame" />'); | |
//overlay on iframes | |
$('.overlayiFrame iframe').css("pointer-events","none"); | |
$('.overlayiFrame').click(function () { | |
$('.overlayiFrame iframe').css("pointer-events", "auto"); | |
}); | |
$('.overlayiFrame').mouseleave(function () { | |
$('.overlayiFrame iframe').css("pointer-events", "none"); |