Skip to content

Instantly share code, notes, and snippets.

@rwbaker
rwbaker / HTML5_reset.css
Created June 21, 2010 14:57 — forked from nathansmith/html_reset.css
Nathan Smith's HTML5 reset merged with Eric Meyer's reset.
a,
abbr,
acronym,
address,
applet,
article,
aside,
audio,
b,
big,
@rwbaker
rwbaker / ajax-colorbox.js
Created June 21, 2011 11:01
Ajax Load Colorbox Assets
//Add colorbox style
var url = '../css/colorbox.css';
if ( document.createStyleSheet ) {
//http://msdn.microsoft.com/en-us/library/ms531194%28VS.85%29.aspx
document.createStyleSheet(url,1);
} else {
jQuery.root.find('head').append('<link rel="stylesheet" media="all" href="'+url+'">');
};
@rwbaker
rwbaker / clearfix.css
Created October 16, 2011 21:03
Clearfix
/*
Author: Nathan Smith; sonspring.com
Source: http://960.gs
*/
.clear
{clear:both; display:block; overflow:hidden; visibility:hidden; width:0; height:0}
.clearfix:before,.clearfix:after
{content:'\0020'; display:block; overflow:hidden; visibility:hidden; width:0; height:0}
@rwbaker
rwbaker / html5template.html
Created October 16, 2011 23:36
HTML5 Template
<!doctype html>
<!--[if lt IE 7]> <html class="ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="ie8 oldie" lang="en"> <![endif]-->
<!--[if IE 9]> <html class="ie9" lang="en"> <![endif]-->
<!--[if gt IE 9]><!-->
<html lang="en">
<!--<![endif]-->
<head>
<meta charset="utf-8">
@rwbaker
rwbaker / flexgrid.css
Created October 16, 2011 23:38
Flexgrid
/*
Author: Richard W. Baker; rwbaker.com
*/
/* Flex Grids; Modeled after 960.gs */
.flexgrid {}
/* Here is your gutter */
.flexgrid .grid_content {margin:0 10px;}
@rwbaker
rwbaker / html5reset.css
Created October 16, 2011 23:41
Eric Meyer Reset w/ HTML5 reset - minified
/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 License:none (public domain) */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;}
/* HTML5 display-role reset for older browsers */
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block;}
body{line-height:1;}ol,ul{list-style:none;}blockquote,q{quotes:none;}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}table{border-collapse:collapse;border-spacing:0;}
@rwbaker
rwbaker / mediaqueries.css
Created October 17, 2011 00:09
Basic Media Queries
/*
Media Queries
Author: Misc
Source: Misc
Requires: https://github.com/scottjehl/Respond
*/
/* Smart Phones */
@media screen and (max-width: 480px){
}/*/mediaquery*/
@rwbaker
rwbaker / jquerybase.js
Created October 17, 2011 01:35
JavaScript: jQuery Plugin Bootstrap
$(document).ready(function() {
app.loadPlugins()
//Initialize for all pages
app.init.main()
})
var app = {
@rwbaker
rwbaker / dateExtend.js
Created October 17, 2011 01:36
JavaScript: Extend Date
//Extend Date to have a few extra fatures
Date.dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
Date.monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
Date.prototype.dayNames = Date.dayNames;
Date.prototype.monthNames = Date.monthNames;
Date.prototype.getDayName = function() {
return this.dayNames[this.getDay()];
};
Date.prototype.getDayNameAbbr = function() {
@rwbaker
rwbaker / todaysDate.js
Created October 17, 2011 01:37
JavaScript: Get today's date
//Set the date
var today = new Date;
today.day = today.getDayName();
today.month = today.getMonthName();
today.date = today.getDay();
today.year = getFullYear();
//Extend Date to have a few extra fatures
Date.dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];