Created
April 24, 2013 01:16
-
-
Save Fauntleroy/5448840 to your computer and use it in GitHub Desktop.
A terse gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form id="placeholder_test"> | |
<input name="test" type="text" placeholder="Placeholder Text" /> | |
<button type="submit">Submit</button> | |
</form> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-placeholder/2.0.7/jquery.placeholder.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* See if fake placeholders 'stick' in some browsers */ | |
$(function(){ | |
$('input').placeholder(); | |
$('#placeholder_test').on( 'submit', function( e ){ | |
e.preventDefault(); | |
alert( $(this).serialize() ); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment