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
// prevent tabbing from moving the slides around | |
// intercept with preventDefault and tab back to field with initial focus class based on current slide # | |
$(".tabBackToInitialFocus").keydown(function(event){ | |
if(event.keyCode == 9) { // tab key | |
event.preventDefault(); | |
// currentSlideNumber is set after each navigation action (click on "Next"/"Back" buttons, etc) | |
$(".initialFocus" + currentSlideNumber).select(); | |
} | |
}); |
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($){ | |
var methods = { | |
init: function(options) { | |
log("init"); | |
var $this = this; | |
var opts = $.extend({}, $.fn.globalMessage.defaults, options); | |
var data = $this.data('globalMessage'); |
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 getAjaxResultAndReturnIt() { | |
$.getJSON("/url", function(json){ | |
if(json.result) { | |
return true; // will not bubble up as return of function call | |
} else { | |
return false; // will not bubble up as return of function call | |
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
// 1234567 | |
// racecar | |
// 0123456 | |
// >>>X<<< close in on it, only need half the length of word loopage | |
function is_palindrome(word) { | |
var outcome = true; | |
for(i = 0; i <= (word.length / 2); i++) { | |
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 { | |
[column_1_label] => "Initial Payment" | |
[column_1_tier_1_value] => "{UpfrontCost}" | |
[column_1_tier_1_footnote] => "" | |
[column_1_tier_2_value] => "" | |
[column_1_tier_2_footnote] => "" | |
[column_2_label] => "20 Year Savings" | |
[column_2_tier_1_value] => "{20YearSavings}" | |
[column_2_tier_1_footnote] => "" | |
[column_2_tier_2_value] => "{FederalLocalRebateSum}" |
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
can i only embed public gists? |
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
# This works | |
def welcome_email(email) | |
recipients email.email | |
subject "Welcome to PeerPong!" | |
sent_on Time.now | |
body :email => email.email | |
from "[email protected]" | |
reply_to "[email protected]" | |
end |
NewerOlder