This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
//CHANGE ORDER OF BIRTHDAY SELECTS | |
var birthdayFields = []; | |
birthdayFields = $('.engagements_field_birthday').find('select'); | |
//ARRANGE SELECTS | |
function arraymove(arr, fromIndex, toIndex) { | |
element = arr[fromIndex]; | |
arr.splice(fromIndex,1); | |
arr.splice(toIndex,0,element); | |
}; |
This file contains hidden or 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/momentjs/moment.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
var currentDate = moment().utc(); | |
//Time is set to PST (UTC minus 8 for time zone offset) | |
//var startDate = moment('1-24-2013 14 -08:00', 'MM-DD-YYYY HH Z').utc(); | |
// Start Date should be set in following format: 1-24-2013 | |
// Start Time should be set in 24 hour format. So, for 2pm, use following: 14 |
This file contains hidden or 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
$("embed").attr("wmode", "opaque"); | |
var embedTag; | |
$("embed").each(function(i) { | |
embedTag = $(this).attr("outerHTML"); | |
if ((embedTag != null) && (embedTag.length > 0)) { | |
embedTag = embedTag.replace(/embed /gi, "embed wmode="opaque" "); | |
$(this).attr("outerHTML", embedTag); | |
} else { | |
$(this).wrap("<div></div>"); | |
} |
This file contains hidden or 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 kkeys = [], konami = "38,38,40,40,37,39,37,39,66,65"; | |
$(document).keydown(function(e) { | |
kkeys.push( e.keyCode ); | |
if ( kkeys.toString().indexOf( konami ) >= 0 ) { | |
$(document).unbind('keydown',arguments.callee); |