Skip to content

Instantly share code, notes, and snippets.

Avatar

Jon Raasch jonraasch

View GitHub Profile
@jonraasch
jonraasch / jquery.json2.js
Created Jun 18, 2010
Adds JSON object support to browsers that don't support it natively. Uses the json2.js script from http://www.json.org , which is the same as is used by modern browsers.
View jquery.json2.js
// loads json2.js if JSON not supported
if ( typeof(JSON) == 'undefined' ) $.getScript('json2.js');
@jonraasch
jonraasch / clearfix.css
Created Jul 29, 2010
Alternative clearfix method
View clearfix.css
.clearfix:after{
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.clearfix{ display: inline-block;}
@jonraasch
jonraasch / drag-controls.html
Created Sep 2, 2010
Drag controls for oversized content
View drag-controls.html
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Drag Controls for Oversized Content</title>
<style type="text/css">
#full-sized-area {
position: relative;
View comment-count-bars.html
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Comment Count Bars</title>
<style type="text/css">
View subtle-mouse-effects.html
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Subtle Mouse Effects</title>
<style type="text/css">
.subtle {
-webkit-transition: background-color 500ms ease-in; /* Saf3.2+, Chrome */
@jonraasch
jonraasch / force-chrome-frame.html
Created Sep 30, 2010
force chrome frame (via Paul Irish)
View force-chrome-frame.html
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
</head>
View fancy-slideshow-navigation.html
<!doctype html>
<html lang="en">
<head>
<title>Fancy Slideshow Navigation (example)</title>
<style type="text/css">
#slideshow {
width: 900px;
View huge-dropdown-menu.html
<!doctype html>
<html lang="en">
<head>
<title>Huge Dropdown Menu (example)</title>
<style type="text/css">
body {
background-color: #86c6d7;
@jonraasch
jonraasch / animated-icon.html
Created May 5, 2011
animated icon on hover
View animated-icon.html
<!doctype html>
<html lang="en">
<head>
<title>Animated Icons (example)</title>
<style type="text/css">
body {
View extrude-on-hover.html
<!doctype html>
<html lang="en">
<head>
<title>Extruding Text on Hover (example)</title>
<style type="text/css">
body {
background-color: #444;