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 () { | |
setInterval(function(){ | |
$('.image-preview-wrapper').not('.hideBtnAdded').each(function() { | |
var t = $(this); | |
if (t.find('.hideImg').length === 0) { | |
t.append('<button class="hideImg">Hide This Image</button>'); | |
t.addClass('hideBtnAdded'); | |
} | |
}); |
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
$('#chat_app_input').keypress(function(e) { | |
if (e.keyCode === 13) { | |
console.log('enter pressed'); | |
} | |
return false; | |
}); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>untitled</title> | |
<style> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>untitled</title> | |
<style> |
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
// Views | |
var SchoolsView = Backbone.View.extend({ | |
el: $('#ridley_schools table'), | |
collection: new SchoolList(), | |
matchingSchools: $('#school_row_template').html(), | |
initialize: function(){ | |
_.bindAll(this, 'render'); // to solve the this issue | |
this.collection.bind('reset', this.render); |
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
<!doctype html> | |
<head> | |
<style> | |
body { | |
margin: 50px; | |
} | |
ol { |
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
// Countdown Clock | |
function countdown(action) { | |
function countItDown() { | |
var cd = $('#countdown'); | |
if (cd.val() > 0) { | |
cd.val(cd.val() - 1); | |
setTimeout(countItDown, 1000); | |
} else { | |
clearTimeout(); |
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 iOS device, and insert class on body tag. You can't upload files | |
* on iOS devices, but you can on Android devices, so using mobile style sheets | |
* won't work for showing and hiding certain content during the sign up process. */ | |
(function isIOS() { | |
if (/iPhone|iPod|iPad/i.test(navigator.userAgent)) { | |
$('html').addClass("ios"); | |
} else { | |
$('html').addClass("no-ios"); | |
} | |
})(); |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!--[if lt IE 9]> | |
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<style> |
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
/* | |
* I hate how the Issue Subject field has autocomplete turned on, | |
* but others at my place of employment don't share the same sentiments | |
* so this script will turn off autocomplete locally without modifying | |
* the code base. | |
*/ | |
(function noAutoComplete() { | |
document.getElementById("issue_subject").setAttribute("autocomplete", "off"); | |
})( |