Created
November 26, 2014 17:57
-
-
Save dacur/6234d5eeb6fa8d84e28e to your computer and use it in GitHub Desktop.
Animate a form: drops into view from the top of the page when 'add' button is clicked. When 'save' is clicked, it animates up and out of view again. No extra JS library needed.
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 ShowAssertiveForm(){ | |
| $('.assertiveFormSlider').animate({ | |
| top: '400px' | |
| }, 600); | |
| } | |
| function HideAssertiveForm(){ | |
| $('.assertiveFormSlider').animate({ | |
| top: '-400px' | |
| }, 400); | |
| SaveAssertiveForm(); | |
| } | |
| // .assertiveFormSlider is the div that holds the form |
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
| #addAssertiveItem.assertiveFormSlider | |
| p.font700 Opportunity to Be Assertive | |
| textarea(id='assertiveOpportunityText', class='form-control', placeholder='Type opportunity here...') | |
| p.font300 Use these tips to think through how you will express your needs and respond in the field below. | |
| p.font700 How Will I Express My Needs: | |
| textarea(id='assertiveExpressionText', class='form-control', placeholder='Type response here...', rows='4') | |
| button.btn.btn-default.form-control.button.trackit#assertiveSaveBtn(type='button') Save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment