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
// Comparison Helper for handlebars.js | |
// Pass in two values that you want and specify what the operator should be | |
// e.g. {{#compare val1 val2 operator="=="}}{{/compare}} | |
Handlebars.registerHelper('compare', function(lvalue, rvalue, options) { | |
if (arguments.length < 3) | |
throw new Error("Handlerbars Helper 'compare' needs 2 parameters"); | |
operator = options.hash.operator || "=="; |
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
{% raw %} | |
<script type="text/x-handlebars-template" id="gallery-template"> | |
{{#each cards}} | |
<div class="entry" data-index="{{itemIndex}}"> | |
{{{image}}} | |
<div class="share-btns"> | |
<div class="fbshare"><a href="#">Share</a></div> | |
<div class="tweet-btn"><a href="#">Tweet</a></div> | |
{{{shareActions}}} | |
</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
function temporarySwap(array) | |
{ | |
var left = null; | |
var right = null; | |
var length = array.length; | |
for (left = 0, right = length - 1; left < right; left += 1, right -= 1) | |
{ | |
var temporary = array[left]; | |
array[left] = array[right]; | |
array[right] = temporary; |
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
{% plugin rawtext desktop_url %} | |
<script type="text/javascript"> | |
top.location.href="{{ desktop_url }}"; | |
</script> |
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
Handlebars.registerHelper("debug", function(optionalValue) { | |
console.log("Current Context"); | |
console.log("===================="); | |
console.log(this); | |
if (optionalValue) { | |
console.log("Value"); | |
console.log("===================="); | |
console.log(optionalValue); | |
} |
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
Handlebars.registerHelper("debug", function(optionalValue) { | |
console.log("Current Context"); | |
console.log("===================="); | |
console.log(this); | |
if (optionalValue) { | |
console.log("Value"); console.log("===================="); console.log(optionalValue); | |
} | |
}); |
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
Handlebars.registerHelper ('truncate', function (str, len) { | |
if (str.length > len) { | |
var new_str = str.substr (0, len+1); | |
while (new_str.length) { | |
var ch = new_str.substr ( -1 ); | |
new_str = new_str.substr ( 0, -1 ); | |
if (ch == ' ') { | |
break; |
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
<script src="https://s3.amazonaws.com/wildfireapp/assets/jstorage.min.js"></script> | |
<div class="sweeps-tab tab clearfix"> | |
<div class="header"> | |
<h1>Buy one get one FREE. Kodak 5x7 folded greeting card. Register for your FREE COUPON!</h1> | |
</div> | |
<div class="left-col"> | |
<div class="sweeps-container cvs" style="display: none;" data-store="cvs"> | |
{% plugin sweeps cvs_sweeps %} | |
{% marker cvs_sweeps %} |
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
<a href="#">Click me</a> | |
<object width="420" height="315"><param name="movie" value="http://www.youtube.com/v/EzNhaLUT520?version=3&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/EzNhaLUT520?version=3&hl=en_US" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed></object> | |
<script type="text/javascript"> | |
(function($){ | |
$(document).bind('afterfbinit', function(){ | |
$('a').on('click', function(e){ | |
e.preventDefault(); | |
FB.ui({ |