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
/* BEFORE */ | |
// locals | |
for(var local in config.locals)(function(local){ | |
this[local] = config.locals[local] | |
})(local) | |
var Int = function(local){ | |
this.local = local | |
} |
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="jquery.js"></script> | |
<script src="autoresize.jquery.js"></script> | |
<script> | |
$(function () { | |
// Apply the autoresize plugin to your textarea | |
$("textarea").autoresize(); | |
// Pass the debug parameter to see the mirrored element | |
$("#my-textarea").autoresize({debug:true}); | |
}); |
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
/* | |
---------- Development -------------- | |
/assets/ | |
js/ | |
libs/ | |
jquery.bxSlider.js | |
mustache.js | |
modules/ | |
utilities.js | |
partials/ |
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
bind_searchbar: function() { | |
var cooq = this, | |
input = $("#search"), | |
results = [], | |
results_element = '.live-search-results', | |
current_element = null, | |
show_search_help = null, | |
hide_search_help = null; | |
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
Modernizr.load({ | |
test: ('ontouchstart' in window), | |
yep: 'script/path.js', | |
complete: function(){ | |
alert('yay, the library is loaded'); | |
} | |
}); |
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
// main.js | |
function loadGoogleMapsApi(){ | |
if(typeof google === "undefined"){ | |
var script = document.createElement("script"); | |
script.src = "https://maps.google.com/maps/api/js?sensor=false&callback=loadGoogleMapsApiReady"; | |
document.getElementsByTagName("head")[0].appendChild(script); | |
} else { | |
loadGoogleMapsApiReady(); | |
} | |
} |
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
// Sample form package | |
require_form = function (callback) { | |
require([ | |
"form", | |
"validate", | |
"multiselect", | |
"form_extend" | |
], function(){ | |
require(["my_validate"], callback); | |
} |
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($){ | |
$(function() { | |
var bg = $("#site-background").find("img"), | |
bgh = bg.height(), | |
bgw = bg.width(), | |
img_prop = bgw/bgh, | |
w = $(window), | |
wh = w.height(), | |
ww = w.width(), | |
w_prop = ww/wh; |
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 object(o){ | |
function F() {}; | |
F.prototype = o; | |
return new F(); | |
} |
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(){ | |
var parent_url; | |
// Create the hidden input field that will hold the parent_url variable. | |
$("form").append('<input name="parent_url" id="parent_url" />'); | |
// We check to see if location hash is empty. It should only go in here if you're using IE and after the form as been submitted. | |
if(document.location.hash == ""){ | |
var search = document.location.search, | |
id = "parent_url=", |