Skip to content

Instantly share code, notes, and snippets.

@evanshajed
evanshajed / google-font-loader.js
Created January 18, 2013 15:32
JavaScript Snippets for Google Web Font Loader
/* Google Font Loader */
WebFontConfig = {
google: { families: [ 'Ubuntu+Condensed::latin' ] } //place your font name within ['...']
};
(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
/*!
* JavaScript - loadGoogleMaps( version, apiKey, language )
*
* - Load Google Maps API using jQuery Deferred.
* Useful if you want to only load the Google Maps API on-demand.
* - Requires jQuery 1.5
*
* Copyright (c) 2011 Glenn Baker
* Dual licensed under the MIT and GPL licenses.
*/
/*
Make the Facebook Like box responsive (fluid width)
https://developers.facebook.com/docs/reference/plugins/like-box/
*/
/* This element holds injected scripts inside iframes that in some cases may stretch layouts. So, we're just hiding it. */
#fb-root {
display: none;
}
@evanshajed
evanshajed / media_queries_standard_device.css
Created September 25, 2012 19:50
Media Queries for Standard Devices
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen and (min-width : 321px) {
/* Styles */
@evanshajed
evanshajed / bootstrap-alert-mail-check.js
Created May 3, 2012 17:34
Bootstrap JQuery Instant Mail Check Snippet
/* Bootstrap Alert snippet for JQuery Mail Check plugin.
Read More about JQuery Mail Check plugin: http://github.com/Kicksend/mailcheck/
Add mailcheck.js first before using this snippet....
*/
bootstrap_alert = function() {}
bootstrap_alert.warning = function(message) {
$('#alert_placeholder').html('<div class="alert alert-info fade in"><a class="close" data-dismiss="alert">×</a><strong>Are you typing '+message+'?</strong></div>')