From ed5be6bf46bce9f18ffdaea7079ccf5639ea2e57 Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Mon, 6 Jun 2011 02:34:49 -0700 Subject: [PATCH] Add syntax highlighting to the README. --- README.md | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 061076f..e18303e 100644 --- a/README.md +++ b/README.md @@ -8,24 +8,30 @@ ### HTML - - - - - - - +``` html + + + + + + + +``` ### jQuery - $('input, textarea').placeholder(); +``` js +$('input, textarea').placeholder(); +``` ### CSS The plugin automatically adds `class="placeholder"` to the elements who are currently showing their placeholder text. You can use this to style placeholder text differently: - input, textarea { color: #000; } - .placeholder { color: #aaa; } +``` css +input, textarea { color: #000; } +.placeholder { color: #aaa; } +``` ## Notes @@ -34,8 +40,10 @@ The plugin automatically adds `class="placeholder"` to the elements who are curr * Caches the results of its two feature tests in `jQuery.fn.placeholder.input` and `jQuery.fn.placeholder.textarea`. For example, if `@placeholder` is natively supported for `input` elements, `jQuery.fn.placeholder.input` will be `true`. After loading the plugin, you can re-use these properties in your own code. * Makes sure it never causes duplicate IDs in your DOM, even in browsers that need an extra `input` element to fake `@placeholder` for password inputs. This means you can safely do stuff like: - - + ``` html + + + ``` And the `