Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/archan937/seat_holder

The modest Javascript placeholder
https://github.com/archan937/seat_holder

Last synced: about 2 months ago
JSON representation

The modest Javascript placeholder

Awesome Lists containing this project

README

        

h1. SeatHolder

The modest Javascript placeholder

h2. Introduction

SeatHolder is a small Javascript library which lets you display placeholder text (so called @seatholders@) and place default values to text inputs and textareas with great ease. It uses jQuery ("http://jquery.com":http://jquery.com) to keep your HTML as clean as possible.

h2. Installation

h3. When including jQuery yourself

Just include SeatHolder after you have included jQuery:




*Note*: include @seat_holder-min.js@ for the minified SeatHolder library

h3. When letting SeatHolder include jQuery automatically

Make sure you put the @jquery@ directory in the same directory as the SeatHolder library:


|
|-- seat_holder.js
|
|-- jquery
|
|-- core.js

Just include SeatHolder:



*Note*: include @seat_holder-min.js@ for the minified SeatHolder library

h2. Usage

h3. Placeholders

Just add the @seatholder@ attribute to your inputs:



...


...

h3. Default values

As stated above, you can also specify default values for text inputs and textareas. Just start the @seatholder@ attribute with @'&'@:



...


...

For a complete live demo, please visit "http://codehero.es/demos/seat_holder":http://codehero.es/demos/seat_holder and "http://gettopup.com/demo":http://gettopup.com/demo.

h3. SeatHolder.react()

You can tell SeatHolder whether to react on focus events of hinted elements are not and it does at default of course. Just call @SeatHolder.react(bool)@ in which @bool@ can be left undefined (it will be assumed as @true@) or can be a boolean (SeatHolder will not react on focus events when @false@).

h2. Contact me

For support, remarks and requests please mail me at "[email protected]":mailto:[email protected].

h2. Credit

This Javascript library depends on:

jQuery

"http://jquery.com":http://jquery.com

h2. ToDo's

None

h2. License

Copyright (c) 2010 Paul Engel, released under the MIT license

"http://holder.nl":http://holder.nl - "http://codehero.es":http://codehero.es - "http://gettopup.com":http://gettopup.com - "http://twitter.com/archan937":http://twitter.com/archan937 - "[email protected]":mailto:[email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.