Created
September 27, 2012 19:17
-
-
Save chadoh/3795866 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| $(function(){ | |
| /* currency converter */ | |
| $('#link-currency').click(function(e){ | |
| e.preventDefault(); | |
| $('#popup-currency').toggleClass('active'); | |
| }); | |
| /* add style to form when input is highlighted */ | |
| $('#bid_amount').focus(function(){ $('form#new_bid').addClass('focused'); }); | |
| $('#bid_amount').blur( function(){ $('form#new_bid').removeClass('focused'); }); | |
| /* focus the form (for browsers that don't support autofocus) */ | |
| $('#bid_amount').focus(); | |
| /* form validation */ | |
| $('#new_bid').validate({ | |
| rules: { | |
| bid_amount: { | |
| required: true, | |
| number: true, | |
| min: 10 | |
| } | |
| }, | |
| errorLabelContainer: '#inlineErrors', | |
| onkeyup: false, | |
| onfocusout: false, | |
| onclick: false, | |
| debug: true | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment