place-holder.js

Include placeholder in input fields with this simple place-holder.js


Project maintained by ankitjain28may Hosted on GitHub Pages — Theme by mattgraham

place-holder.js

Codacy Badge Code Climate Test Coverage Issue Count npm version npm

place-holder.js is a less than 1 KB(444 bytes) Javascript file based on Jquery which is used to include placeholder in your input fileds. Don’t need to include placeholder manually of every input field just include place-holder.js.

Getting Started

First include jQuery to your web page. There are several ways to start using jQuery on your web site. You can: Download the jQuery library from jQuery.com Include jQuery from a CDN, like Google, Microsoft

Downloading jQuery The jQuery library is a single JavaScript file, and you reference it with the HTML ‘script’ tag (notice that the ‘script’ tag should be outside the ‘body’ section at the bottom):

<script type ="text/javascript" src ="jquery-3.0.0.min.js"></script>

After including jQuery you need to include placeholder.js in your web page by downloading this project or clone is project Include place-holder.js after the jquery library

<script type="text/javascript" src="place-holder.min.js"></script>

Note: Place the downloaded file in the same directory as the pages where you wish to use it.

Install using npm

npm install place-holder.js

Use unpkg

https://unpkg.com/place-holder.js@2.2.4

Install using bower

bower install place-holder.js

###Information for the place-holder.js

bower info place-holder.js

Example

	<!DOCTYPE html>
	<html>
		<head>
			<title>Index</title>
		</head>
		<body>
			<form>
				<input type="text" name="name">
				<input type="email" name="email">
				<input  name="mobile">
				<input type="submit">
				<textarea></textarea>
			</form>
		</body>
		<script type="text/javascript" src="jquery-3.0.0.min.js"></script>
			<script type="text/javascript" src="place-holder.min.js"></script>
	</html>

Contribute

Feel free to contribute

License

Copyright (c) 2016 Ankit Jain - Released under the MIT License