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
var hostarray = new Array(); | |
hostarray["subdomain.somewhere.com"] = "subdomain.somewhere.com/application/home.html"; | |
function redirect() | |
{ | |
//Obtain the host name in lowercase format | |
var lhost = new String(location.host); | |
lhost = lhost.toLowerCase(); |
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
<!-- add the vendor as product tag to product then use this code in collection.liquid --> | |
<!-- if we are on a collection page that is either custom or smart --> | |
{% if collection.url != blank %} | |
<h4>Shop by vendor:</h4> | |
<ul> | |
{% for product_vendor in collection.all_vendors %} | |
<li> | |
{% if current_tags contains product_vendor %} | |
<a class="active" href="{{ collection.url }}">{{ product_vendor }}</a> | |
{% else %} |
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="text">Some text with <b>html</b>... Any length.</div> | |
* | |
*/ | |
$('.text').each(function(){ | |
var length = 5; | |
var details = $(this); | |
var original_html = details.html(); | |
var original_text = details.text(); | |
var truncated_text = $.trim(original_text).substring(0, length).split(" ").slice(0, -1).join(" ") + " "; |
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
var autoElm = document.getElementById('elm-name'); | |
autocomplete = new google.maps.places.Autocomplete(autoElm); | |
google.maps.event.addListener(autocomplete, 'place_changed', function () { | |
var place = autocomplete.getPlace(); | |
if (!place.geometry) { | |
return; | |
} | |
instance.setCenter(place.geometry.location); | |
instance.setZoom(19); |
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
{% layout none %}{% comment %} | |
/* | |
* Simple blog feed | |
* | |
* Copyright (c) 2015 Jason Bowman (jason@freakdesign.com.au) | |
* Licensed under the MIT license: | |
* http://www.opensource.org/licenses/mit-license.php | |
* | |
*/ | |
{% endcomment %}<?xml version="1.0" encoding="UTF-8"?> |
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
<h1 class="shimmer">Some Shimmer Text</h1> | |
<style> | |
@import url('http://fonts.googleapis.com/css?family=Alegreya+Sans:300'); | |
body{ | |
background: #000; | |
} | |
.shimmer{ | |
/* styling stuff */ | |
font-family:"Alegreya Sans"; |
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
// Codi-net.com | |
if (window.location.href.indexOf('checkout') > -1) { | |
window.onload = function() { | |
var script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.src = "https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places"; | |
script.async = "true"; | |
script.defer = "defer"; | |
document.body.appendChild(script); |