https://github.com/amiel/html5support
Support certain HTML 5 attributes with javascript, but only if the browser doesn't already support them.
https://github.com/amiel/html5support
Last synced: about 1 year ago
JSON representation
Support certain HTML 5 attributes with javascript, but only if the browser doesn't already support them.
- Host: GitHub
- URL: https://github.com/amiel/html5support
- Owner: amiel
- License: mit
- Created: 2010-01-26T22:05:34.000Z (over 16 years ago)
- Default Branch: master
- Last Pushed: 2014-06-16T19:02:36.000Z (about 12 years ago)
- Last Synced: 2024-10-03T12:33:10.198Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 176 KB
- Stars: 24
- Watchers: 3
- Forks: 14
- Open Issues: 3
-
Metadata Files:
- Readme: README.rdoc
- License: MIT-LICENSE.txt
Awesome Lists containing this project
README
= HTML5 Support
The aim of HTML5 is to seamlessly provide support an extremely lightweight plugin for a few commonly used html5 attributes for browsers that don't already support them.
HTML5 Support currently supports the placeholder attribute and the autofocus attribute.
HTML5 Also supports type="password" fields, by special casing them, and swapping elements.
== Example
=== HTML
=== jQuery
$(document).ready(function() {
$.html5support();
// or you can also run only support for what you want
$.placeholder();
// - or -
$.autofocus();
});
=== CSS
Use this CSS if you would like your placeholder text to show up grey in browsers that do not natively support placeholder.
.placeholder{ color: #888; }
== TODO
Support could be added for more HTML5 features. Ideas:
*
== License
HTML5 Support is licensed under the MIT License. See the MIT-License.txt file for full details.