Download
User Rating: 2.4/5 ( 2 votes)
jQuery Placeholder Label is a simple plugin placeholder attached with label
Source: fabiorogeriosj.com.br
1. INCLUDE JS FILES
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript" src="../src/jquery.placeholder.label.js"></script>
2. HTML
<form>
<input id="name" type="text" placeholder="Enter your name" alt="Name" value="Fábio Rogério SJ">
<input id="email" type="text" placeholder="Enter your email" alt="E-mail">
<input id="password" type="password" placeholder="Enter your password" alt="Password">
</form>
3. JAVASCRIPT
$(document).ready(function (){
$('input[placeholder]').placeholderLabel();
});
4. OPTIONS
$('input[placeholder]').placeholderLabel({
placeholderColor: "#898989", // Color placeholder
labelColor: "#4AA2CC", // Color label (after the focus)
labelSize: "14px" // Size of label (after the focus)
useBorderColor: true, // If true a border input is altered after focus
inInput: true, // If true the label is actually in half vertically
timeMove: 200 // Time effect move after focus
});