Skip to content

Instantly share code, notes, and snippets.

View jonraasch's full-sized avatar

Jon Raasch jonraasch

View GitHub Profile
@jonraasch
jonraasch / input-placeholder.js
Created June 7, 2012 22:42
HTML5 placeholder fallback that handles passwords (jquery)
/* JS fallback for HTML5 placeholder
* requires jQuery and Modernizr (to detect support)
* by Jon Raasch - @jonraasch - http://jonraasch.com/
* modified script from Nico Hagenburger: http://bit.ly/LgrkT0
*/
if(!Modernizr.input.placeholder){
$('[placeholder]').focus(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
@jonraasch
jonraasch / animated-icon.html
Created May 5, 2011 15:15
animated icon on hover
<!doctype html>
<html lang="en">
<head>
<title>Animated Icons (example)</title>
<style type="text/css">
body {
<!doctype html>
<html lang="en">
<head>
<title>Animated Image (example)</title>
<style type="text/css">
body {
<!doctype html>
<html lang="en">
<head>
<title>Huge Dropdown Menu (example)</title>
<style type="text/css">
body {
background-color: #86c6d7;
@jonraasch
jonraasch / fancy-slideshow-navigation.html
Created May 5, 2011 15:02
fancy slideshow navigation
<!doctype html>
<html lang="en">
<head>
<title>Fancy Slideshow Navigation (example)</title>
<style type="text/css">
#slideshow {
width: 900px;
@jonraasch
jonraasch / extrude-on-hover.html
Created May 5, 2011 14:59
extrude text on hover
<!doctype html>
<html lang="en">
<head>
<title>Extruding Text on Hover (example)</title>
<style type="text/css">
body {
background-color: #444;
@jonraasch
jonraasch / force-chrome-frame.html
Created September 30, 2010 18:45
force chrome frame (via Paul Irish)
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
</head>
@jonraasch
jonraasch / subtle-mouse-effects.html
Created September 2, 2010 22:42
Subtle mouse effects
<?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 / comment-count-bars.html
Created September 2, 2010 22:37
Comment count bars
<?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">
@jonraasch
jonraasch / drag-controls.html
Created September 2, 2010 22:28
Drag controls for oversized content
<?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;