jQuery popup form? [closed]
I开发者_如何学JAVA have a form which is currently sitting in a division on a php page.
I would like it to do the following:
- User clicks link to bring up form in pop-up division in center of screen
- User fills out the form
- User hits the submit button
- Form closes and brings up another small division with a thank you message which shows for 5 seconds then disappears
What's going to be the easiest way to achieve this?
I currently have jQuery and jQuery Tools scripts on the site in question.
EDIT: I'can't use jquery-ui as that conflicts with jQuery tools accordion.
You should have a look at this documentation about jQuery UI Dialogs:
http://jqueryui.com/demos/dialog/
Have also a look at Modal Forms
(look at the navigation menu at the right of the page).
Basically, you only set up a form inside of a dialog.
Having that thank you -Dialog show up for a few seconds is also easy by using jquery Dialogs and something like setTimeout
to close it.
Don't forget to include the jQuery and jQuery UI libraries into your source code. Have a look at some jQuery tutorial first, if you don't know jQuery.
For similar task, I used JQuery UI Dialog
http://jqueryui.com/demos/dialog/#modal-form
精彩评论