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
Use "Selection/Split into Lines" (Ctrl+Shift+L on Windows and Linux, Cmd+Shift+L on OS X) | |
(Shift+Alt+W) wrap lines in tag |
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
n.ToString("D2") | |
http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx |
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
{% if c.handle contains collection.handle and c.handle != collection.handle %} | |
<li class="{{ forloop.index }}"> | |
<a href="{{ c.url }}" title="{{ c.title }}"> | |
<span class="product-border"></span> | |
<div class="img-wrap"> | |
<span class="img-wrap__inner"> | |
<img src="{{ c.image.src | collection_img_url: 'medium' }}"> | |
</span> | |
</div> |
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
module Compass::SassExtensions::Functions::Sprites | |
def sprite_url(map) | |
verify_map(map, "sprite-url") | |
map.generate | |
generated_image_url(Sass::Script::String.new(map.name_and_hash)) | |
end | |
end | |
module Compass::SassExtensions::Sprites::SpriteMethods | |
def name_and_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
//POLYFILL PLACEHOLDERS IN IE8/9 | |
if (document.createElement("input").placeholder == undefined) { | |
//GET ALL TEXT INPUTS | |
var inp = document.querySelectorAll('input[type=text]'); | |
//LOOP THROUGH AND USE PLACEHOLDER AS VALUE | |
for (i=0;i<inp.length;i++) { | |
var plhTxt = inp[i].getAttribute('placeholder'); | |
inp[i].setAttribute('value',plhTxt); | |
//SET VALUE TO BLANK ON FOCUS IF VALUE = PLACEHOLDER | |
inp[i].onfocus=function(){ |
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
//TEST FOR SUPPORT OF MIN-HEIGHT ON DISPLAY TABLE ELEMENTS | |
(function() { | |
//CREATE ELEMENT IN DOM | |
var elem = document.createElement('div'); | |
//ADD STYLES | |
elem.style.display = 'table'; | |
elem.style.minHeight = '2px'; | |
//APPEND TO DOM | |
document.body.appendChild(elem); | |
//MEASURE HEIGHT |
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
if (!Array.prototype.indexOf) { | |
Array.prototype.indexOf = function(obj, start) { | |
for (var i = (start || 0), j = this.length; i < j; i++) { | |
if (this[i] === obj) { return i; } | |
} | |
return -1; | |
} | |
} |
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
Property Description | |
hash Returns anchor portion of the URL, including the leading hash. (“#results”) | |
host Returns the hostname and port (if available) of a URL. (“www.example.com” or “www.example.com:80″) | |
hostname Returns the hostname portion of the URL (“www.example.com”) | |
href Returns the entire URL. (“http://www.example.com:80/example.php?x=1&y=2#results”) | |
pathname Returns the path name of the URL (“/example.php”) | |
port Returns the port portion of the URL (“80″ within the host “www.example.com:80″) | |
protocol Returns the protocol portion of the URL, including the trailing colon (“http:”, “https:”, “ftp”, etc) | |
search Returns the query portion of the URL, including the question mark (“?x=1&y=2″) |
OlderNewer