loading..

loading, please wait...
Mohit Aneja a.k.a CSSJockey

CSSJockey.com

Hello! I am Mohit Aneja, Designer and Developer based in India.
I believe in creating a Unique & Practical Web Presence not just html pages.
If you need some cool stuff, let's talk :)

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.

View Demo | Download Code

xHTML Code


Clients Area



Press ESC to close

CSS Code

%MINIFYHTMLa54cf31629cf54445a027d764468a65666%

jQuery Code

%MINIFYHTMLa54cf31629cf54445a027d764468a65619%%MINIFYHTMLa54cf31629cf54445a027d764468a65620%

What more features can I zip for you? Do let me know in the comments.

You may also like to read..

61 Comments on An easy way to create login panel with jQuery and CSS


  1. Jan 07, 2013 / Draveos:
    Thanks so much for this code snippet. Works great and adds a modern look to any website lacking creativity! :) Reply
  2. May 24, 2012 / haitham:
    hello i want to use such thing in my web site but i reall dunno why u type css and jquery code like this i cant eveb read and why between %% Reply
  3. May 21, 2012 / Thirry:
    Where do you place these files and will it connect to either wp_members or s2members? Reply
  4. Mar 28, 2012 / jamie:
    Luv this code, but how do I set the username and password? How can I redirect the page after logging in? Please help! Reply
    1. Mar 31, 2012 / Mohit Aneja:
      You would need to use server side language like PHP or ASP.net for that functionality. Reply
  5. Mar 16, 2012 / autism treatments:
    I just couldn't go away your website prior to suggesting that I really enjoyed the usual information a person provide for your visitors? Is gonna be back frequently in order to check up on new posts Reply
  6. Feb 16, 2012 / Pedro:
    I really like your post works fantactic. Just wondering if you could of help with this. I woul like to add a feature to javascript so the user can close the pop up log in box by clicking outside of it rather then using esc or to have both options? thanks Reply
    1. Feb 27, 2012 / Mohit Aneja:
      For this you can use use CSS or jQuery :hover to show the inner DIV, remember you need to add hover to the parent and it should wrap the form and other stuff. Reply
  7. Feb 02, 2012 / Web Design Lancashire:
    A perfect little addition to any website. Thanks for sharing. Reply
  8. Jan 19, 2012 / heng:
    pretty cool login! i will use this for my website. Reply
  9. Oct 09, 2011 / Mark:
    Simple and works perfectly, awesome job and thanks! Reply
  10. Sep 05, 2011 / vem:
    ..thank yo for this code it will help me to finish my project..keep on posting like this code God bless Reply
  11. Sep 01, 2011 / Chris:
    Lovely tutorial - have implemented it on my site.Thanks. Reply
  12. Jul 17, 2011 / Shubhamoy:
    Hi Mohit,Thanks a ton for this article! It helped me a lot in my recent project.BR, Shubhamoy Reply
  13. Jul 05, 2011 / Guy:
    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; }); Reply
  14. May 13, 2011 / Rakesh Mishra:
    Thanks. Reply
  15. Feb 16, 2011 / pramod:
    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 Reply
  16. Feb 07, 2011 / sayid:
    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 :) Reply
  17. Jan 29, 2011 / cye:
    i'm going to use this.. thanks!!! Reply
  18. Jan 25, 2011 / Nitesh Chauhan:
    hello, this post was really amazing.. thanx i am not into UI development but i am intrested in learning it. this was helpful. Reply
  19. Nov 07, 2010 / saboo:
    very nice Reply
  20. Nov 07, 2010 / Anders:
    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? Reply
    1. Nov 08, 2010 / CSSJockey:
      Nope its not hard, you can use jQuery mouseout event to accomplish this task. Reply
  21. Oct 19, 2010 / Surge:
    Great post, it is nice to have people sharing good code to help the community. Reply
    1. Oct 21, 2010 / CSSJockey:
      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 ;) Reply
  22. Sep 29, 2010 / Yogesh Singh:
    very use full dude !!!! thanks Reply
  23. Sep 27, 2010 / yogesh kanthale:
    its really helpful thanks for that Reply
  24. Aug 10, 2010 / Shashwat:
    Thanks you for sharing this code its working great ... Reply
  25. Aug 03, 2010 / Philip:
    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 againall the best! Reply
    1. Aug 05, 2010 / CSSJockey:
      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. Reply
  26. Jul 24, 2010 / Ardy:
    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 Reply
    1. Jul 25, 2010 / CSSJockey:
      You can edit the CSS and remove the styles. Reply
  27. Jul 06, 2010 / Naples web design:
    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. Reply
    1. Jul 08, 2010 / CSSJockey:
      I m glad you like it.. stay tuned for more... Reply
  28. Jun 27, 2010 / csska:
    good post to create best admin panel) Reply
  29. Jun 18, 2010 / Achumbra:
    cool, simple panel, how can i add "Remember me" checkbox to it?thank you. Reply
    1. Jun 22, 2010 / CSSJockey:
      You can add any form tags in the HTML code and add functionality as per your requirements. Reply
  30. May 26, 2010 / Hans:
    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 Reply
    1. May 26, 2010 / CSSJockey:
      Thanks, I am glad you like it.. Stay tuned for more.. Reply
  31. May 22, 2010 / Aminul Islam Sajib:
    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. Reply
    1. May 24, 2010 / CSSJockey:
      I'm sure this website will help you learn the basics: http://www.w3schools.com/ check it out!! Reply
  32. May 20, 2010 / Web Design Preston:
    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! Reply
  33. May 13, 2010 / Francisco Schiltz:
    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! Reply
    1. May 16, 2010 / CSSJockey:
      Thanks, I am glad you like what I share.. Reply
  34. Apr 27, 2010 / alice@postalgold:
    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 ? Reply
  35. Apr 24, 2010 / Master:
    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 Reply
  36. Apr 21, 2010 / Rahim Afghan:
    Thank you, it looks great. Can I use it for commercial sites? Reply
    1. May 19, 2010 / CSSJockey:
      Sure, you are free to use this code on any project you do :) Reply
  37. Mar 09, 2010 / Cihat:
    thank you for post it is very nice thanks again Reply
  38. Feb 24, 2010 / vector graphics:
    very nice panel thanks Reply
  39. Feb 19, 2010 / Web Design Manchester:
    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? Reply
    1. Feb 19, 2010 / CSSJockey:
      You can use Ajax with jQuery or other frameworks to handle errors and other actions. Reply
  40. Feb 12, 2010 / Nena Gutscheinbuch:
    Tanks a lot for this post. I like simple login panel. Reply
  41. Feb 12, 2010 / Sean:
    Sweeet. I've come across similar tutorials but I really like the way this one works. Code looks clean. Thanks. Reply
  42. Feb 10, 2010 / HR:
    best one yaar... let me try to put on my blog sitethanks once again Reply
    1. Dec 24, 2011 / KeithM:
      Simple and elegant slide-in. Very fluid. Easy to customise. Love it. Thanks for posting. Reply
  43. Feb 10, 2010 / Fabrizio:
    Very very Nice! I'll try it to my site as soon as. Thank you for post. Reply

Leave a Reply

Stay up-to-date

Get latest tutorials and articles directly in your email.

Subscribe in RSS Reader

Connect via Facebook

Follow me on Twitter

Visit our Google+ Profile

Connect via Skype

I keep my Skype open all day long while I work on my computer.
Feel free to ping me to start conversation.

I love good conversations!!
If you have some big ideas, suggestions, feedback,
or want to discuss your project give me a shout.

 
%d bloggers like this: