An easy way to create login panel with jQuery and CSS
Among many studies conducted to find out just what influences people’s perception of a website’s credibility, one interesting finding is that users really do judge a book by its cover… or rather, a website by its design.
Rapid changes in design trends are driving focus towards its usability. More and more features are being zipped into a plain and simple design for users to get bountiful results without spending more than a jiffy. The back-end coding is the key device to achieve this simplicity in design.
Keeping this mind, I’ve designed a small script to introduce a sliding login box into your website, just as you see in Twitter login page. The script comprises jQuery & CSS techniques to display this arty feature. Checkout the code below and try it yourself or simply download the ready to use files.
xHTML Code
CSS Code
jQuery Code
What more features can I zip for you? Do let me know in the comments.

Simple and works perfectly, awesome job and thanks!
..thank yo for this code it will help me to finish my project..keep on posting like this code
God bless
Lovely tutorial – have implemented it on my site.
Thanks.
Hi Mohit,
Thanks a ton for this article! It helped me a lot in my recent project.
BR,
Shubhamoy
And iPad has no Mouseout click, so the panel does not disappear with a touch outside the box. Maybe add a link inside the script (or cross) with a CLOSE-link?
press ESC or close
$(“#login-close”).click(function() {
$(“#login-panel”).hide(0);
return false;
});
Thanks.
thankyou,
but I need to validate the username and password in php and then rediect to index page if its the right user and if not the dialog box should remain still showing invalid username or password
Thanks for sharing this simple and nice code with us, just one note on this css code:
# #login-panel{
# position: absolute;
# top: 26px;
# rightright: 0px;
….}
I think there is a mistake on the last line on login-panel identifier and need to be modified to \right:0px\
thanks again
i’m going to use this.. thanks!!!
hello, this post was really amazing.. thanx i am not into UI development but i am intrested in learning it. this was helpful.
very nice
Really good tutorial, was not hard to implement it either.
But i wonder, is it hard to modify it so the box goes away if you click anywhere else on the page?
Nope its not hard, you can use jQuery mouseout event to accomplish this task.
Great post, it is nice to have people sharing good code to help the community.
Thanks!! Stay tuned for more.. I don’t post much due to my busy schedule, however whenever I have time, I publish something worth sharing
very use full dude !!!! thanks
its really helpful thanks for that
Thanks you for sharing this code its working great …
Thanks you very much for sharing your knowledge with us,
i try to add 3 links with different content in each drop box but i can;t find how to do this,
i need to duplicate the function? or i can add some (“#login-link,#link2,#link3″)
thanks a lot again
all the best!
If you need different content then you would need to duplicate the function or else you can use multiple selectors to have the same functionality.
hello
This is cool man
would you like to tell me how to erase black top border, i just only need box of client area, i am new one in web design
Thanks a lot
You can edit the CSS and remove the styles.
I have tried the code and it works well with my blog. Thanks for giving up the code. The code are well managed and if there’s a bug it’s easy to locate and fix.This is one of those login panel I love to put in my sites because I have found other to be like this which is quite similar.
I m glad you like it.. stay tuned for more…
good post to create best admin panel)
cool, simple panel, how can i add “Remember me” checkbox to it?
thank you.
You can add any form tags in the HTML code and add functionality as per your requirements.
Must say! This is a nice and clean code example, you are rocking man!!!
Many thanks to you bro!!
Keep up the god work!!
Hans
Thanks, I am glad you like it.. Stay tuned for more..
Hi there! I’m an old WordPress user and love blogging and modifying themes to add personal touch to my blog. But I’m completely new to CSS designing and haven’t yet stepped into learning PHP and Javascript or jQueries (what are the differences?). So, I’m a little confused which code to place where. I mean, let’s say the CSS code will be placed in the stylesheet page, right? And what about xHTML and jQuery? Where do I place them?
Hopefully you will help me understand it. Thanks in advance.
I’m sure this website will help you learn the basics: http://www.w3schools.com/ check it out!!
Smooooooooth!
I wonder if it is just that no one knows about these elegant little jQuery functions or they are too lazy to implement them…? Whatever the answer I’m not going to fall into the trap, this code is going on to all future projects of mine! Thanks again Mohit!
I have been to your site half a dozen times now, and this time I am adding it to my bookmarks
Your discussions are always relevant, unlike the same-old stuff on other sites (which are coming off my bookmarks!) Rock on!
Thanks, I am glad you like what I share..
Thanks alot for the post…and the design is simple and clean too! Where do I insert the code, in wordpress blogs…will it be in the header ?
Tanks a lot for this post.
I like simple login panel.I have 1 site to share with your .
Professiona and top page rank guide for beginners
http://www.tutorials99.com
Thank you, it looks great. Can I use it for commercial sites?
Sure, you are free to use this code on any project you do
thank you for post it is very nice thanks again
very nice panel thanks
Fully loving that, quite slick with the animation, pressing the escape key-could that not be functionised and made into a close button on the top right of the dialog box which drops down.
How does this application handle error messages with login?
You can use Ajax with jQuery or other frameworks to handle errors and other actions.
Tanks a lot for this post.
I like simple login panel.
Sweeet. I’ve come across similar tutorials but I really like the way this one works. Code looks clean. Thanks.
best one yaar… let me try to put on my blog site
thanks once again
Very very Nice! I’ll try it to my site as soon as. Thank you for post.