Menu
Is free
registration
home  /  Multimedia/ Jquery registration form. JQuery step-by-step registration

Jquery registration form. JQuery step-by-step registration

Online Twitter You can see the page work with a clean and simple design. Look at the top right of the page, there you will see a button authorization to the system by clicking on which you will see shape to fill in the data. Today we will tell you how to make a similar effect on your own website. It's actually very simple. In addition, it will help you save space on the page and add a sense of comfort to your visitors. In this article, we will walk you through the steps of how this whole system works, and this guide will also be useful for those who wish to learn jQuery... Forward!

HTML code

First, you need to start with the HTML code. The HTML code is very simple - it contains the "a" tag, which goes along with the "fieldset" tag, through which the form is displayed.

Just copy this into your new page code:


Have an account? Sign in













Forgot your password?


title = "(! LANG: If you remember your password, try logging in with your email" !}
href = "#"> Forgot your username?






CSS code

You will need to use CSS to define the login button and login form. The code below does exactly that function.

Just copy this code into your css file, or add it to the HTML code where you define the style. These codes identify the authorization button.

#container (
width: 780px;
margin: 0 auto;
position: relative;
}

#content (
width: 520px;
min-height: 500px;
}
a: link, a: visited (
color: # 27b;
text-decoration: none;
}
a: hover (
text-decoration: underline;
}
a img (
border-width: 0;
}
#topnav (
padding: 10px 0px 12px;
font-size: 11px;
line-height: 23px;
text-align: right;
}
#topnav a.signin (
background: # 88bbd4;
padding: 4px 6px 6px;
text-decoration: none;
font-weight: bold;
color: #fff;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
* background: transparent url ("images / signin-nav-bg-ie.png") no-repeat 0 0;
* padding: 4px 12px 6px;
}
#topnav a.signin: hover (
background: # 59B;
* background: transparent url ("images / signin-nav-bg-hover-ie.png") no-repeat 0 0;
* padding: 4px 12px 6px;
}
#topnav a.signin, #topnav a.signin: hover (
* background-position: 0 3px! important;
}

a.signin (
position: relative;
margin-left: 3px;
}
a.signin span (
background-image: url ("images / toggle_down_light.png");
background-repeat: no-repeat;
background-position: 100% 50%;
padding: 4px 16px 6px 0;
}
#topnav a.menu-open (
background: # ddeef6! important;
color: # 666! important;
outline: none;
}
#small_signup (
display: inline;
float: none;
line-height: 23px;
margin: 25px 0 0;
width: 170px;
}
a.signin.menu-open span (
background-image: url ("images / toggle_up_dark.png");
color: # 789;
}

And then comes the definition of the login form:

#signin_menu (
-moz-border-radius-topleft: 5px;
-moz-border-radius-bottomleft: 5px;
-moz-border-radius-bottomright: 5px;
-webkit-border-top-left-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
display: none;
background-color: # ddeef6;
position: absolute;
width: 210px;
z-index: 100;
border: 1px transparent;
text-align: left;
padding: 12px;
top: 24.5px;
right: 0px;
margin-top: 5px;
margin-right: 0px;
* margin-right: -1px;
color: # 789;
font-size: 11px;
}

#signin_menu input, #signin_menu input (
display: block;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border: 1px solid #ACE;
font-size: 13px;
margin: 0 0 5px;
padding: 5px;
width: 203px;
}
#signin_menu p (
margin: 0;
}
#signin_menu a (
color: # 6AC;
}
#signin_menu label (
font-weight: normal;
}
#signin_menu p.remember (
padding: 10px 0;
}
#signin_menu p.forgot, #signin_menu p.complete (
clear: both;
margin: 5px 0;
}
#signin_menu p a (
color: # 27B! important;
}
#signin_submit (
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
background: # 39d url ("images / bg-btn-blue.png") repeat-x scroll 0 0;
border: 1px solid # 39D;
color: #fff;
text-shadow: 0 -1px 0 # 39d;
padding: 4px 10px 5px;
font-size: 11px;
margin: 0 5px 0 0;
font-weight: bold;
}
#signin_submit :: - moz-focus-inner (
padding: 0;
border: 0;
}
#signin_submit: hover, #signin_submit: focus (
background-position: 0 -5px;
cursor: pointer;
}

It's time to work with javascript

It would seem that the HTML and CSS codes are quite complex and convoluted, but in javascript everything is very simple. Just copy this javascript code, due to which it will be possible to display and hide the form at the moment of clicking on the authorization button, even if the click is made outside the login form.



According to the code above, when a visitor clicks on the authorization button, a new function is triggered. First, the login form (enclosed in the "filedset" tag) is displayed, then the link enclosed in the ".signin" class adds another "menu-open" class, which changes the background image.

Another event in this code is that when visitors click not on the login form, but somewhere on the page, the form closes itself. In other words, the "menu-open" class strips off the link with the ".signin" class and returns the original background image to it.

As for hints?


We usually recommend using jQuery plugin - tipsy... The content of the tooltip is what is written in the "title" attribute of the link. You can change the position of the tooltip relative to east, west, south or north. This is done through the "gravity" parameter specified in the code above. We provide you with a link to a site dedicated to this plugin, where you can study its capabilities in more detail and download the plugin. ...

Finally

If you've copied all the code from this article, please don't change the folder structure. If you change it, the code will not work. This code is just an example of creating dropdown login form using jQuery... Good luck with your practice!

In this tutorial, we will create a stylish login form on the site, you can find it in Futurico UI Pro, created by Vladimir Kudinov. We will be using CSS3 and jQuery to create the form.

Step 1 - HTML markup

Let's start by creating HTML markup. Let's create a form with four inputs (username, password, checkbox and "submit" button). We'll wrap the checkbox in a span tag that we'll use to style this checkbox. Next, we'll wrap the form and title in a DIV tag and assign the "login-form" class to it.