[转]jQuery Popup Login and Contact Form

本文转自:http://www.formget.com/jquery-popup-form/

Pop up forms are the smart way to present your site. These forms are similar to other forms except, these forms appears abruptly on exact center of screen and requests user to take immediate action over them.

Here, In this example, we explained how to create popup form like Login and Contact form to fulfill below requirements:

  • Login Popup form should appears at the center of screen after specific time interval by jQuery on load event .
  • Contact form may appear on click event of a button or any link.

Here, we have covered above requirements in this example as given below:

  • To popup login form after specific time interval on page load, we used following jQuery code.
setTimeout(popup, 3000); // Setting time 3s to popup login form function popup() { $("#logindiv").css("display", "block"); }
  • To popup login form on click event of a button, we used following jQuery code.
$("#onclick").click(function() { $("#contactdiv").css("display", "block"); });

Just watch our live demo or download zip file to use it.

jQuery pop up login form

create pop up contact form using jQuery

 
 

To learn more about it, go through our complete jQuery and HTML codes given below.

HTML File – jquery_popup.html

Given below our complete HTML code to create Login and Contact form.

<html>
<head> <title>jQuery Popup Login and Contact Form</title> <script src="js/jquery.min.js"></script> <link rel="stylesheet" href="css/jquery_popup.css" /> <script src="js/jquery_popup.js"></script> </head> <body> <div id="mainform"> <h2>jQuery Popup Form Example</h2> <!-- Required div starts here --> <div class="form" id="popup"> <b>1.Onload Popup Login Form</b><br/><hr/> <span>Wait for 3 second.Login Popup form Will appears.</span><br/><br/><br/> <b>2.Onclick Popup Contact Form</b><hr/> <p id="onclick">Popup</p> <br/> </div> <!-- Right side div --> <div id="formget"><a href=http://www.formget.com/app><img src="images/formget.jpg" alt="Online Form Builder"/></a> </div> </div> <!--Contact Form --> <div id="contactdiv"> <form class="form" action="#" id="contact"> <img src
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值