Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- $(document).ready(function() {
- $.fn.cleardefault = function() {
- return this.focus(function() {
- if( this.value == this.defaultValue ) {
- this.value = "";
- }
- }).blur(function() {
- if( !this.value.length ) {
- this.value = this.defaultValue;
- }
- });
- };
- $(".clearit input, .clearit textarea").cleardefault();
- });
- </script>
Add Comment
Please, Sign In to add comment