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 ($.browser.msie){ | |
$(document).ready(function(){ | |
$('[placeholder]').focus(function() { | |
var input = $(this); | |
if (input.val() == input.attr('placeholder')) { | |
input.val(''); | |
input.removeClass('placeholder'); | |
} | |
}).blur(function() { | |
var input = $(this); |
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
// Array Remove - By John Resig (MIT Licensed) | |
Array.prototype.remove = function(from, to) { | |
var rest = this.slice((to || from) + 1 || this.length); | |
this.length = from < 0 ? this.length + from : from; | |
return this.push.apply(this, rest); | |
}; |
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() { | |
// Hide the elements initially | |
var lis = $('li').hide(); | |
// When some anchor tag is clicked. (Being super generic here) | |
$('a').click(function() { | |
var i = 0; | |
// FadeIn each list item over 200 ms, and, | |
// when finished, recursively call displayImages. | |
// When eq(i) refers to an element that does not exist, | |
// jQuery will return an empty object, and not continue |
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
String.prototype.killWhiteSpace = function() { | |
return this.replace(/\s/g, ''); | |
}; | |
$('.element').killWhiteSpace(); |
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 getParameterByName(name) { | |
var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search); | |
return match && decodeURIComponent(match[1].replace(/\+/g, ' ')); | |
} | |
// Useful for a url like www.iframe.com/93493434?pram_name=2323 |
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({ |
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
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
Handlebars.registerHelper("debug", function(optionalValue) { | |
console.log("Current Context"); | |
console.log("===================="); | |
console.log(this); | |
if (optionalValue) { | |
console.log("Value"); console.log("===================="); console.log(optionalValue); | |
} | |
}); |