<commit_before>Sexy HTML5 Placeholder Shim
=======================

A sexier HTML5 placeholder shim. Dress it up however you like.

[![Build Status](https://travis-ci.org/tylermauthe/jquery-sexy-placeholder.png?branch=master)](https://travis-ci.org/tylermauthe/jquery-sexy-placeholder)
[![Selenium Test Status](https://saucelabs.com/buildstatus/sexyplaceholder)](https://saucelabs.com/u/sexyplaceholder)

## Support
This plugin is fully tested with IE8 and IE9 on Windows 7. Might work with other browsers...

## Motivation
Other placeholder shims exist and they're very nice in their own way, but this plugin is unassuming and totally stylable. While some other plugins utilize an approach that sets the value in the input element to simulate a placeholder, this plugin uses a simple span element for greater stylability and simplicity. `jquery-sexy-placeholder` makes no assumptions, it is totally submissive. If you can't seem to make up your mind about what you want from this plugin, then you lay back, relax, and let the plugin do all the work by using a predefined default method - more on this below.

## Usage
Say you've got a few input elements:
```html
  <input placholder="Username" type="text" />
  <input placholder="Password" type="password" />
  ...
```
You can initialize jquery-sexy-placeholder as easily as this: `$('input').sexyPlaceholder()`

Then style the css class `placeholder`: (taken from [WebKit Default User Agent Stylesheet](http://trac.webkit.org/browser/trunk/Source/WebCore/css/html.css))
```css
  .placeholder {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 80%;
    word-spacing: -1px;
    color: #A9A9A9;
  }
```

## Defaults
If those CSS values above look correct to you and you don't really give a hoot about the styling, instead use `$('input').sexyPlaceholderDefaults()` and you'll have the same CSS defaults set automatically. No need to add the CSS class to your stylesheet as modifications will happen inline - just let the default method do all the work.

## Testing
`jquery-sexy-plugin` uses Jasmine to ensure it stays sexy even after some crazy forking. Please ensure all pull requests for new features have proper tests and that any bug fixes or featre modifications do not fail the existing tests.

Please feel free to criticize, balk at or otherwise refactor the tests too, because I'm a testing `n00b`.

## License
Same license as jQuery, MIT.

## Thanks
If you find this useful, please endorse me: [![endorse](https://api.coderwall.com/tylermauthe/endorsecount.png)](https://coderwall.com/tylermauthe).<commit_msg>Fixed a spelling mistake<commit_after>Sexy HTML5 Placeholder Shim
=======================

A sexier HTML5 placeholder shim. Dress it up however you like.

[![Build Status](https://travis-ci.org/tylermauthe/jquery-sexy-placeholder.png?branch=master)](https://travis-ci.org/tylermauthe/jquery-sexy-placeholder)
[![Selenium Test Status](https://saucelabs.com/buildstatus/sexyplaceholder)](https://saucelabs.com/u/sexyplaceholder)

## Support
This plugin is fully tested with IE8 and IE9 on Windows 7. Might work with other browsers...

## Motivation
Other placeholder shims exist and they're very nice in their own way, but this plugin is unassuming and totally stylable. While some other plugins utilize an approach that sets the value in the input element to simulate a placeholder, this plugin uses a simple span element for greater stylability and simplicity. `jquery-sexy-placeholder` makes no assumptions, it is totally submissive. If you can't seem to make up your mind about what you want from this plugin, then you lay back, relax, and let the plugin do all the work by using a predefined default method - more on this below.

## Usage
Say you've got a few input elements:
```html
  <input placholder="Username" type="text" />
  <input placholder="Password" type="password" />
  ...
```
You can initialize jquery-sexy-placeholder as easily as this: `$('input').sexyPlaceholder()`

Then style the css class `placeholder`: (taken from [WebKit Default User Agent Stylesheet](http://trac.webkit.org/browser/trunk/Source/WebCore/css/html.css))
```css
  .placeholder {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 80%;
    word-spacing: -1px;
    color: #A9A9A9;
  }
```

## Defaults
If those CSS values above look correct to you and you don't really give a hoot about the styling, instead use `$('input').sexyPlaceholderDefaults()` and you'll have the same CSS defaults set automatically. No need to add the CSS class to your stylesheet as modifications will happen inline - just let the default method do all the work.

## Testing
`jquery-sexy-plugin` uses Jasmine to ensure it stays sexy even after some crazy forking. Please ensure all pull requests for new features have proper tests and that any bug fixes or feature modifications do not fail the existing tests.

Please feel free to criticize, balk at or otherwise refactor the tests too, because I'm a testing `n00b`.

## License
Same license as jQuery, MIT.

## Thanks
If you find this useful, please endorse me: [![endorse](https://api.coderwall.com/tylermauthe/endorsecount.png)](https://coderwall.com/tylermauthe).
{'fraction_non_alphanumeric': 0.09949865021210953, 'fraction_numerical': 0.005784805244890089, 'mean_word_length': 4.577419354838709, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4056511', 'n_tokens_mistral': 1510, 'n_tokens_neox': 1418, 'n_words': 636}