Perfect signin dropdown box likes Twitter with jQuery

Perfect signin dropdown box likes Twitter with jQuery


Spread it!

  • Share

Twitter’s running a new homepage with clean and easy design. Look at the top right of Twitter’s homepage, you’ll see the sign in button which will drop down the login form. Today, I will make an entry to show you how to create a login drop down with Twitter style using jQuery. It’s really easy, it’ll help you save the space of your webpage and make visitors feel comfortable by the awesome toggle login form. This entry will explain how it works step by step and it’s good for learning jQuery how to do the toggle and tooltips. Enjoy it!

It always has a demo and download at the beginning of my post.

Intro

HTML Code

At first, begin with the HTML code. HTML is very simple and contains a link button <a> tag, comes together with <fieldset> tag to display the form.

Copy and paste the following code in a new html page:

<div id="container">
  <div id="topnav" class="topnav"> Have an account? <a href="login" class="signin"><span>Sign in</span></a> </div>
  <fieldset id="signin_menu">
    <form method="post" id="signin" action="https://twitter.com/sessions">
      <label for="username">Username or email</label>
      <input id="username" name="username" value="" title="username" tabindex="4" type="text">
      </p>
      <p>
        <label for="password">Password</label>
        <input id="password" name="password" value="" title="password" tabindex="5" type="password">
      </p>
      <p class="remember">
        <input id="signin_submit" value="Sign in" tabindex="6" type="submit">
        <input id="remember" name="remember_me" value="1" tabindex="7" type="checkbox">
        <label for="remember">Remember me</label>
      </p>
      <p class="forgot"> <a href="#" id="resend_password_link">Forgot your password?</a> </p>
      <p class="forgot-username"> <A id=forgot_username_link 
title="If you remember your password, try logging in with your email" 
href="#">Forgot your username?</A> </p>
    </form>
  </fieldset>
</div>

CSS Code

You need to use css to define the Sign In button and and the Login Form. The following codes code below is used to do that.

Copy and paste the following code to your css file or add it into your HTML page where you define the styles, these codes below define the Sign In 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 the CSS codes below defines 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[type=text], #signin_menu input[type=password] {
    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

Surprisedly, the HTML and CSS codes seem to be complicated, but the Javascript is so simple. Simply copy and paste these Javascript code below to show/hide when users click on the Sign In button, even when click outside the Login Form.

<script src="javascripts/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
        $(document).ready(function() {

            $(".signin").click(function(e) {
                e.preventDefault();
                $("fieldset#signin_menu").toggle();
                $(".signin").toggleClass("menu-open");
            });

            $("fieldset#signin_menu").mouseup(function() {
                return false
            });
            $(document).mouseup(function(e) {
                if($(e.target).parent("a.signin").length==0) {
                    $(".signin").removeClass("menu-open");
                    $("fieldset#signin_menu").hide();
                }
            });            

        });
</script>

As the codes above, when users click on the Sign In button, it’ll call a new function. At first, the Login Form (under the <filedset> tag) will be showed, then the link with class name “.signin” will be added one more class name “menu-open” to change the background image.

Another event in this code is the event when users click outside the Login Form, the Form will be hided. In another hand, it removes the class name “menu-open” out of the link “.signin” to return the original background image of that link.

What’s about the Tooltips?

 <script src="javascripts/jquery.tipsy.js" type="text/javascript"></script> 

 <script type='text/javascript'>
  $(function() {
   $('#forgot_username_link').tipsy({gravity: 'w'});
  });
 </script>

I’m using the tipsy plugin of jQuery. The content inside tooltip base on the “title” attribute of the link. You can change the position of the tooltip by East, West, South, North as easy as change the value of “gravity” on the code above. I would like to forward you a link to the homepage of this plugin, so that you can learn more how to use this tooltip. See more ..

Conclusion:

If you download the completed source code from my post, please dont change the structure of folders. If changed, the code will not work.  This code is just an example how to create the dropdown and the tooltip with jQuery. If you gonna say to me like this below, please read it firt.

IE6: Hi man!
Me: What's up, bro?
IE6: You almost forget me,man. I can not display correctly the css above. It doesn't work, man!
Me: I'm sorry man, but you're outdated man. Get out of my way before i kick your ass man!
  • Digg This Post
  • Tweet This Post
  • Stumble This Post
  • Submit This Post To Delicious
  • Submit This Post To Reddit
  • Submit This Post To Mixx
  • Share on your Facebook
  • Submit this post to Dzone
  • Submit this post to Designbump
  • Submit this post to TheWebBlend

Author: Lam Nguyen

I'm Lam Nguyen, a 21 year old web developer writing about everything related to web design. I am owner of AEXT.NET and WhoFreelance.com Web Community News. You can catch me on twitter.


176 User Comments

  1. cancel bubble 13. Aug, 2009 at 6:33 pm #

    Positioning of the login form is a bit off on this end in FF 3.5 and IE 7 on the PC. Didn’t test anything else.

    What browser did you take your screenshot in and what browsers did you test your code in?

    • Lam Nguyen 13. Aug, 2009 at 11:10 pm #

      This screenshot is Twitter homepage. I tested it on FF 3.0 (I will check it in FF 3.5), and IE7 is OK.

  2. krishna 13. Aug, 2009 at 11:39 pm #

    hi Lam.. nice to see back in blog..keep it …best wishes

  3. cancel bubble 14. Aug, 2009 at 10:51 am #

    Here’s how it looks on my end in FF 3.5 and IE7:

    http://s260.photobucket.com/albums/ii2/magenta_placenta/?action=view&current=twitter_login.jpg

    • Lam Nguyen 14. Aug, 2009 at 11:15 am #

      Is this still likes that or changed? Because I have changed something in my code and updated the demo already. Thank you a lot about notifying me.
      But I think it display not correctly in Safari. We need some trick to cross the Safari Browser. Right?

      • cancel bubble 14. Aug, 2009 at 11:48 am #

        Looks to be the same on this end. Cleared cached/refreshed. Hopefully some others can confirm the positioning as well.

        I just checked in Safari 4.0.2 (PC) and it’s not quite right-aligned (looks real similar to the IE7 screenshot).

        In Chrome the form/dropdown appears right-aligned to “Have an account” so it’s way off compared to the other browsers.

    • Lam Nguyen 14. Aug, 2009 at 11:51 am #

      Maybe my browser was crashed :D Hehehe. Some guys already confirm as you did. After work, I have to made some changes
      Thanks guy!

  4. Mark 14. Aug, 2009 at 11:41 am #

    Awesome tutorial – thanks very much!

    The positioning issues in IE7 and FF3.5 look easy to fix at first glance. I plan to modify this code in the next day or two … when I get those positioning issues straightened out, I’ll send you the info! Thanks again!

  5. CoryMathews 14. Aug, 2009 at 11:54 am #

    Nice to see a fellow web developer in Texas. But you may want to open up Opera and take a look. Its WAY off. Same with this comment box. I cannot tell which field is what.

  6. Deepali 18. Aug, 2009 at 4:11 am #

    Hello,

    Could you please give me its mootools version?

    Thank you.

  7. Mark 18. Aug, 2009 at 2:36 pm #

    Looking at the code, you’ll see that the positioning of the dropdown box is stated in the html (not the css). Using Firebug, you can see that when you re-size your browser the value for the position changes automatically. So they must be using Javascript to calculate the browser width, then using this value to determine the dynamic position.

    Anyone know how to do this with Javascript?

    • Lam Nguyen 18. Aug, 2009 at 3:10 pm #

      Hi Mark,
      It’s CSS but it was defined inline. You can define it in one style file if you want to.

      Because this dropdown box is absolute position. You said it will change the position when you resize the width of browser, it’s correct. But if you define the width of parent DIV. You will see box’s position will display correctly even when you resize the browser.

      No need to use javascript!

      • Mark 18. Aug, 2009 at 3:20 pm #

        Interesting … thanks!

      • Mark 18. Aug, 2009 at 3:32 pm #

        Yes, you are correct. I just tried your method and it worked perfectly! Thanks again!

    • Lam Nguyen 18. Aug, 2009 at 3:39 pm #

      You’re welcome. I’ll thank you back if you share this post hehehe. Just kidding

  8. jatropha 19. Aug, 2009 at 7:52 am #

    Really good Article Thanks for info.

  9. Thuan 29. Aug, 2009 at 4:30 am #

    Hi Lam,

    Nice code and great post. I am redesign my portal site in Viet Nam and could I use your code?

    Thanks,
    Thuan

  10. Tim 29. Aug, 2009 at 12:53 pm #

    Wow that quite amazing,but when i uploaded it to my website the dropdown box is out of alignment.

    Here is the url
    http://www.ultimatewebnet.com/m/w/

    • Lam Nguyen 29. Aug, 2009 at 2:27 pm #

      Hi,
      I was notified about that mistake some days ago. I’ve updated the code and uploaded new version of this download file.

  11. David 03. Sep, 2009 at 3:41 am #

    Great tutorial mate!

    Will save a bit of time for me.

    Thanks
    David

  12. Kris 29. Sep, 2009 at 8:14 pm #

    Awesome!

    Is this working correctly in IE6 now?

    • Lam Nguyen 30. Sep, 2009 at 11:09 am #

      I’m not sure because my bootcamp does not work for days…

  13. John 01. Oct, 2009 at 5:52 am #

    Nice! but,
    the drop downdown login box can’t be displayed when there is a flash at the background for IE 7. I use wmode=transparent for my flash but still doesn’t work.
    You can solve this problem by using z-index = -1 for the div where the flash is stored, but i don’t want to do that because i loose the linkable content of the flash.
    Is there any solution ??

    thank you a lot.

    • Lam Nguyen 01. Oct, 2009 at 10:30 am #

      If your problem is the flash covers the login box, so, why don’t you set login box’s z-index larger than the div including flash?

      • Joe 03. Mar, 2010 at 4:00 am #

        This is actually not working, i have the whole form included in a div with a higher z-index than the flash and it’s still not displaying above, i have vmode=transparent and im sure i can display other items above flash, but i just cant get the login to display above it, did you find a way ever since or can you please simply email me the answer? thank you very much

  14. tperri 07. Oct, 2009 at 1:10 pm #

    I can’t get the sign_menu to display properly at all in FireFox. Do you mind looking at my site real quick?

    thanks,

    • Lam Nguyen 09. Oct, 2009 at 12:13 pm #

      Sure, give me your link. I’ll do anything I can help!

  15. juan 23. Oct, 2009 at 12:02 am #

    hi, i can’t download code what happen? you check the link thank great tutorial

    • Lam Nguyen 23. Oct, 2009 at 1:47 am #

      @juan The link works fine. What’s message you got?

  16. Sarah Gooding 23. Oct, 2009 at 11:15 am #

    Thanks for your tutorial!! I’ve linked to you over in my blog at WPMU.org: http://wpmu.org/7-ways-to-spice-up-your-wordpress-login/ Just thought you might want to know that you’ve been featured. :)

  17. Lam Nguyen 23. Oct, 2009 at 11:44 am #

    @Sarah Gooding Yup, I have just seen your backlink. Thanks for the feature.

  18. Jay 23. Oct, 2009 at 3:44 pm #

    can this be made to use as a wordpress login FOR wordpress?

  19. Sage 23. Oct, 2009 at 7:13 pm #

    I can’t download the code either. I get the generic message:
    Internet Explorer cannot display the webpage

    Most likely causes:
    You are not connected to the Internet.
    The website is encountering problems.
    There might be a typing error in the address.

  20. Lam Nguyen 23. Oct, 2009 at 10:04 pm #

    The link still works fine. I don’t know what happened to someone who could not download it. If you still cannot download it, please try to view source then copy it; Because they both have the same code.

    @Jay: Of course you can, just replace the action link and some values of the textfield and password field.

  21. Sage 23. Oct, 2009 at 10:25 pm #

    I found that it seems to be zone alarm. I’m not sure why that site would be blocked (I didn’t do it), but once I disabled it, your link worked perfectly. Thanks for the advice

  22. Jay 25. Oct, 2009 at 1:42 pm #

    Ive been trying to get this to work with buddypress (wpmu) but it takes all logged in users to the admin (dahsboard) automatically? Anyone know of a way to change that?

    • Lam Nguyen 25. Oct, 2009 at 2:00 pm #

      Yup, because by default, wp takes all logged in users to the dahsboard. If you want to redirect user to another page. Just add a hidden filed to your login form, name it as “redirect_to”:

      <input type="hidden" name="redirect_to" value="wp-admin/" /></input>

      Change the value to the page you want to redirect to.

      Hope it helps you!

  23. juan 25. Oct, 2009 at 5:38 pm #

    this is error when i click in link download:
    Error 7 (net::ERR_TIMED_OUT): Se ha agotado el tiempo de la operación.

    • Lam Nguyen 25. Oct, 2009 at 6:57 pm #

      Maybe you can not access to box.net from your country, or try to turn off your firewall, then try again.

  24. ramu 27. Oct, 2009 at 12:37 am #

    hi wr can i get the images
    signin-nav-bg-hover-ie.png
    signin-nav-bg-ie.png
    toggle_down_light.png
    toggle_up_dark.png
    plzzzzzzz help me in this
    this is not working

  25. ramu 27. Oct, 2009 at 2:50 am #

    hi the javascript is not working…plzzz tell me the correct way dear

  26. juan 27. Oct, 2009 at 1:09 pm #

    yes is my ISP have problem change the ISP a now download correct thank again

  27. ramu 29. Oct, 2009 at 2:20 am #

    no its not working…when i click on signin button there is no drop down box on my screen

  28. Proffesor Smart 29. Oct, 2009 at 8:53 am #

    Lam,

    Please work on your spelling, or use a spell checker. It look unprofessional to have so many spelling mistakes in your blog.

    • Lam Nguyen 29. Oct, 2009 at 1:12 pm #

      Yes :( I’m trying my best. It was caused by typing error. Thanks for the advice.
      @ramu: Please try to download the code in attachment. If you can not download it, try to view source demo, then copy it! The demo is the most completed source code.

  29. David 29. Oct, 2009 at 12:07 pm #

    Hey!

    Nice Dropdownbox! :-)

    It would be great if the first formulare where aktive after open the Dropdownbox, so the user dont have to klick in the username form.

    anyone an idea how this can be released?

    sry for my bad english ^^

  30. O2O 31. Oct, 2009 at 11:43 am #

    i want to understand jquery.js file but it is so complex because all of statement in a line
    could you upload a new jquery.js file again?
    thanks u!

  31. David 02. Nov, 2009 at 12:23 pm #

    Download it at http://jquery.com/

    there is also a documentation aubout jquery.

    anyone have an idea how i can activate the username textbox at the dropdown? that the user dont have to click before they can write.

  32. Lam Nguyen 02. Nov, 2009 at 1:17 pm #

    Use this one for focus on the first textfield element:

    $('input[@type="text"]')[0].focus();

  33. David 04. Nov, 2009 at 3:32 pm #

    i paste the comman in :

    $(document).ready(function() {

    $(“.signin”).click(function(e) {

    e.preventDefault();

    $(“fieldset#signin_menu”).toggle();

    $(“.signin”).toggleClass(“menu-open”);

    $(‘input[@type="text"]‘)[0].focus();

    });

    but it didn´t work.
    I change it to “$(‘username[@type="text"]‘)[0].focus();” then, cause my first input name/id is username, but didn´t work too.
    how can i implement it? im not good at javascript, i only know a bit about html/php.

    thanks for your help!

  34. miCRoSCoPiC^eaRthLinG 05. Nov, 2009 at 9:36 pm #

    One word of advice:
    For me the absolute positioning was going absolutely haywire.

    From my experience, absolute positioned dropdowns like this work best if the container element is set to be relative. In such a case, it’s relatively easy to position the dropdown by setting a specific distance from the right margin of the container element.

    However, according to your code, the element is set to be relative although it is not the parent container for the dropdown’s fieldset.

    What I did was to set the header div (in your case #topnav) to be relative and removed the relative positioning from the . In the CSS I set, right:0 for #signin_menu. This made the page load-up with the dropdown right-aligned. Then on, it was easy to set the correct distance from the right through trial and error. I believe if you do the same in your example, a lot of people will find it easier to work with your code.

    Question: However, for me the layout gets totally f**cked up in IE(7). Any suggestions? I can dump screenshots if required.

  35. Lam Nguyen 06. Nov, 2009 at 12:15 am #

    @miCRoSCoPiC^eaRthLinG: Thanks for the advice. I did noticed by others with the same as you are telling. I will update the code when I’m available. At the time when I posted this tutorial, I’m still a lazier and careless guy. At this moment, I know writing a tutorial with care is very important. I will improve it for sure!

  36. miCRoSCoPiC^eaRthLinG 06. Nov, 2009 at 1:23 am #

    Got the darned thing working in iE :D

    Somehow the IE hacks that worked for you, e.g.

    *margin-right: -1px;

    did not work for me :S

    But replacing the * with a # did the trick. The same may help anyone who’s having a tough time with IE.

    Cheers,
    m^e

    P.S. Some parts of my last comment got parsed by WP and never showed up. For those who are wondering, I was talking about the A tag / element in the 3rd and 4th paragraphs.

  37. Shana 06. Nov, 2009 at 1:52 pm #

    Hi! Great plugin. I am adapting the use for a general message box. Do you know how i would have it so the dropdown is down on load instead of hidden? Thanks!

  38. jess 16. Nov, 2009 at 10:25 pm #

    Very helpful thanks.

  39. Biju Subhash 23. Nov, 2009 at 4:09 am #

    thank you for the great tutorial…
    here is my twitter bird link : http://www.bijusubhash.com/blog/download-your-free-twitter-bird

  40. Scot 23. Nov, 2009 at 6:05 pm #

    Can anyone share how to convert to WordPress login versus Twitter?

    Great work!

  41. Sohail Ahmed 30. Nov, 2009 at 1:44 am #

    This is a very good tutorial but it would be great if you please tell how to make it work in IE as well.

    Thank you

  42. Scott 07. Dec, 2009 at 11:57 am #

    This was a great tutorial, thank you for sharing! well done!

  43. Gus 08. Dec, 2009 at 10:14 pm #

    Just one question to make the menu appear on a MOUSEOVER

    $(".signin").click(function(e) {

    would i replace .click with .mouseover??

  44. Gus 09. Dec, 2009 at 8:26 am #

    Also the basic framework works on IE 6

  45. Gus 09. Dec, 2009 at 8:27 am #

    And in IE 7 :)

  46. Ngô Thanh Tài 28. Dec, 2009 at 6:50 am #

    Cám ơn Lâm Nguyễn ;)
    Mình sẽ thử …

  47. indialike 29. Dec, 2009 at 4:45 am #

    Very nice and useful tutorials to web designers,
    Thanks for posting.

  48. amit 05. Jan, 2010 at 3:41 am #

    Very nice and useful tutorials to web designers,
    Thanks for posting.

  49. Steve 07. Jan, 2010 at 8:54 pm #

    Thank you for taking the time and trouble to share.

  50. Angel 08. Jan, 2010 at 3:05 pm #

    Hi Lam
    Thanks for this little gem. How do I merge this with my existing menu?

  51. Dude 21. Jan, 2010 at 1:15 am #

    Dude! you’re awesome… I was trying to do the exact same menu trying to see how twitter did it.

    Thanks ;)

  52. carlos 24. Jan, 2010 at 12:20 pm #

    gracias!!!!

  53. seo 27. Jan, 2010 at 1:38 am #

    captcha code entegre ?
    seo´s last blog ..Playstation 3 Kırıldı My ComLuv Profile

  54. tufan kursat 29. Jan, 2010 at 9:14 pm #

    thats great thanx :)

  55. Nocleg 04. Feb, 2010 at 8:35 am #

    thats great thanx

  56. Tom 12. Feb, 2010 at 8:45 pm #

    Thanks for this useful tutorial. There’s one thing missing: clicking on the link when the box is open closes & reopens the box. It would be nicer if it just closed the box (like on twitter) so here’s the adjusted code:

    [code]

    $(document).ready(function()
    {
    $(".signin-link").click(function(e)
    {
    e.preventDefault();
    if($(".signin-link").hasClass("box-open"))
    {
    $(".signin-link").removeClass("box-open");
    $("#signin-box").hide();
    }
    else
    {
    $("#signin-box").show();
    $(".signin-link").addClass("box-open");
    }
    });
    $("#signin-box").mouseup(function() {return false});
    $(".signin-link").mouseup(function() {return false});
    $(document).mouseup(function(e)
    {
    if($(e.target).parent(".signin-link").length==0)
    {
    $(".signin-link").removeClass("box-open");
    $("#signin-box").hide(150);
    }
    });
    });

    [/code]

    • Lam Nguyen 21. Feb, 2010 at 1:57 pm #

      Thanks Tom for the adjusted code. I appreciate that!

  57. Giuseppe 13. Feb, 2010 at 7:30 am #

    Hi to everyone,

    Please, Can someone explain how to integrate this twitter login style in Wordpress? I’m trying…but dropdown doesn’t work…

    Thanks

  58. carl 14. Feb, 2010 at 9:37 am #

    I am trying to get this to work and everything does until i click on the login link – the problem is: the box seems to jump to the left side of the screen instead of appearing underneath the actual link?

    I checked all the links to css and js there are no other styling for css on the page

    any ideas?

    Thanks

    mr frustrated

  59. carl 14. Feb, 2010 at 6:19 pm #

    Ok i sorted it – ‘.’ in the css path link – my bad!

  60. arithok 18. Feb, 2010 at 7:52 pm #

    awsome, thx. I’ll try to combine with my drupal blog :)
    arithok´s last blog ..Mengikuti Perjalanan Internet Explorer My ComLuv Profile

  61. Dan 19. Feb, 2010 at 5:20 pm #

    The CSS borders won’t show in IE8 on WinVista.

    • Lam Nguyen 19. Feb, 2010 at 5:38 pm #

      IE doesn’t support rounded border. Sorry!

      • Dan 19. Feb, 2010 at 11:51 pm #

        Yeah, I figured. Thank god we have FireFox and other major browsers.

        The day IE dies is the day the humanity will cease to exist… which is never. It’s a shame IE has caused so much pain. :(

  62. Xanti SS 22. Feb, 2010 at 3:05 am #

    OK, so you’re using a JavaScript library that’s at least 50kb to show a tooltip and toggle a div’s visibility? Where’s the logic in that? It’s simply because it’s so easy. You’d rather waste 75kb of your bandwidth to do something easily, when it can be done in 20 minutes with good cross-browser capability in less than 3kb.

    • Lam Nguyen 22. Feb, 2010 at 3:19 am #

      The purpose of this tutorial is cloning Twitter login pop-up and that’s it! I couldn’t find any way with pure css to create a toggle (hover) effect. Twitter doesn’t care to waste 75kb bandwidth (as what you said), so why do I? And why do you have to spend 20 minutes for such a “good” cross-browser capability which cannot be done with pure css, and cannot generate the same effect like Twitter?

      • Xanti SS 25. Feb, 2010 at 1:26 pm #

        The problem is efficiency, not bandwidth. jQuery is designed to be structured so much that most functions just seem to call each other.

  63. Russell Bishop 22. Feb, 2010 at 3:14 am #

    Nice technique you’ve shared with us here. The Twitter.com Login is a lovely integrated way of gaining access to the site, and it’s nice to be educating web designers how to replicate this kind of end product.

    Unfortunately though, your markup is taken straight from twitter.com, which makes me think you hard copied the whole thing first? Seems a little lame to me.

    I would have preferred to see some innovation too, adding some functionality that Twitter’s login lacks.

    • Lam Nguyen 22. Feb, 2010 at 3:24 am #

      I copied the whole images from their but not with the code, because Twitter has compressed the javascript code!

  64. Harsh gupta 24. Feb, 2010 at 9:45 pm #

    Why we use here ?

    Have an account? Sign in

    if i remove it, this cold will not properly…..

  65. Matthew Moran 25. Feb, 2010 at 9:13 pm #

    this worked great for me right up until i actually tried to use it on my wordpress blog. Every time I click the box to expand, it takes me to http://www.myurl.com/login which is of course a 404 error. I tried changing ‘login’ in the code to # but that didn’t work. you can look at the site to see what i mean. any help would be appreciated.

  66. Joseph 02. Mar, 2010 at 11:06 pm #

    Hey,
    This is class… the username focus ins’nt working with the code you had mentioned earlier… Help!

  67. teorico 03. Mar, 2010 at 7:46 am #

    very thanks, great tutorial…

  68. Michal 09. Mar, 2010 at 9:38 am #

    Hi Lam,

    Thanks for this script, i am using it.

    There is one question i got tough. I want to use this script on more then one div. So i have multiple buttons with multiple divs which they opens. But when i copy this script and change the button and to open and close div it does not work on the second button…

    Any ideas on this?

Trackbacks/Pingbacks

  1. Perfect signin dropdown box likes Twitter with jQuery | AEXT.NET - 14. Aug, 2009

    [...] Read the rest here: Perfect signin dropdown box likes Twitter with jQuery | AEXT.NET [...]

  2. 12 Easy-to-Implement jQuery effects for your Website « Web Design / Development Blog :: Alt Creative - 17. Aug, 2009

    [...] http://aext.net/2009/08/perfect-sign-in-dropdown-box-likes-twitter-with-jquery/ Perfect signin dropdown box likes Twitter with jQuery [...]

  3. Perfect signin dropdown box likes Twitter with jQuery - 17. Aug, 2009

    [...] Visit Source. [...]

  4. Twitted by stevensnell - 17. Aug, 2009

    [...] This post was Twitted by stevensnell [...]

  5. devmarks.com - 17. Aug, 2009

    Perfect signin dropdown box likes Twitter with jQuery…

    [..]Look at the top right of Twitter’s homepage, you’ll see the sign in button which will drop down the login form.[..]

  6. Perfect signin dropdown box likes Twitter with jQuery | AEXT.NET - 17. Aug, 2009

    [...] Read the original: Perfect signin dropdown box likes Twitter with jQuery | AEXT.NET [...]

  7. Twitted by mknayab - 20. Aug, 2009

    [...] This post was Twitted by mknayab [...]

  8. 16个SNS网站常用JS组件 | 路可-WEB前端开发 - 20. Aug, 2009

    [...] 5. Twitter jQuery下拉注册框 [...]

  9. Daily Digest for August 23rd | More Than Scratch The Surface - 23. Aug, 2009

    [...] Shared Perfect signin dropdown box likes Twitter with jQuery | AEXT.NET [...]

  10. 陈宝成のBlog » 16个SNS网站常用JS组件 - 27. Aug, 2009

    [...] 5. Twitter jQuery下拉注册框 [...]

  11. 38 jQuery And CSS Drop Down Multi Level Menu Solutions | Graphic and Web Design Blog - Inspiration, Resources and Tools - 05. Sep, 2009

    [...] 7. Perfect signin dropdown box likes Twitter with jQuery [...]

  12. 38 jQuery And CSS Drop Down Multi Level Menu Solutions | Graphic … | TheUnical Technologies Blog - 06. Sep, 2009

    [...] 7. Perfect signin dropdown box likes Twitter with jQuery [...]

  13. jQueryとCSSによる多階層ドロップダウンメユーの処理法38 | yuxu's notebook - 06. Sep, 2009

    [...] The Fanciest Dropdown Menu You Ever Saw A circular menu with sub menus A Different Top Navigation Perfect signin dropdown box likes Twitter with jQuery Sliding Jquery Menu Tutorial Fancy Sliding Menu for Mootools Create Vimeo-like top navigation [...]

  14. Twitter css login menu | Free Design Magazine, The Best Free Vectors on the Net! - 11. Sep, 2009

    [...] See Explanation [...]

  15. The 10 jQuery and CSS Drop Down Multi Level Menu Solutions | Blogging Tips by TeraTips.com - 13. Sep, 2009

    [...] 7. Perfect signin dropdown box likes Twitter with jQuery [...]

  16. Colección de menús multinivel desarrollados con jQuery y Mootools | Recursos para desarrollo y diseño web - AlmacenPlantillasWeb Blog - 24. Sep, 2009

    [...] 7. Perfect signin dropdown box likes Twitter with jQuery [...]

  17. 38 jQuery And CSS Drop Down Multi Level Menu Solutions - Programming Blog - 29. Sep, 2009

    [...] 7. Perfect signin dropdown box likes Twitter with jQuery [...]

  18. Hot Collection of Free jQuery And CSS Drop Down Multi Level Menu Solutions | guidesigner.net - 01. Oct, 2009

    [...] Perfect signin dropdown box likes Twitter with jQuery [...]

  19. links for 2009-10-06 | On9 Systems - 06. Oct, 2009

    [...] Perfect Dropdown Login Box like Twitter using jQuery | AEXT.NET (tags: jquery dropdown login css twitter javascript tutorial) [...]

  20. Fancy login dropdown box likes Twitter with jQuery | blogfreakz.com - 08. Oct, 2009

    [...] tutorial: http://aext.net/2009/08/perfect-sign-in-dropdown-box-likes-twitter-with-jquery/ View Demo : [...]

  21. Perfect Dropdown Login Box like Twitter using jQuery | AEXT.NET | My Web Development Bookmarks - 21. Oct, 2009

    [...] Read this article: Perfect Dropdown Login Box like Twitter using jQuery | AEXT.NET [...]

  22. 7 Ways to Spice Up Your WordPress Login - WordPress MU and BuddyPress plugins, themes, support, tips and how to's - 23. Oct, 2009

    [...] » Find the demo/tutorial here. [...]

  23. 7 Ways to Spice Up Your WordPress Login | WPMU - 23. Oct, 2009

    [...] » Find the demo/tutorial here. [...]

  24. Un blog à lire | Kueny Raphaël - 26. Oct, 2009

    [...] Reproduire le login de twitter [...]

  25. 10+ astonishing jQuery resources to spice up your website | Programming Blog - 28. Oct, 2009

    [...] Talking about Twitter and their recent site redesign, I might say I really like the login panel they added. With this excellent tutorial, you’ll learn how to do the same for your website or blog. » View tutorial [...]

  26. 3 astonishing jquery resources for registration page designs | Goeshare - 03. Nov, 2009

    [...] want to know the css code?Just view the tutorial. » View tutorial [...]

  27. jquery関連のプラグインまとめ « vanillate - 03. Nov, 2009

    [...] Perfect signin dropdown box likes Twitter with jQuery ツイッターライクなログインフォーム デモ [...]

  28. jQuery Bookmarks | Блогът на Наси - 06. Nov, 2009

    [...] Perfect signin dropdown box likes Twitter with jQuery [...]

  29. CSS 3 cheat sheet | WebDesignExpert.Me - 20. Nov, 2009

    [...] Dropdown login box using  jQuery – Link. [...]

  30. Twitted by cliffoliveira - 20. Nov, 2009

    [...] This post was Twitted by cliffoliveira [...]

  31. Create a Twitter Style Login Form with jQuery « Creative Solutions - 20. Nov, 2009

    [...] Twitter is running a new homepage with clean and easy design for a while already. Look at the top right of Twitter’s homepage, you’ll see the sign in button which will drop down the login form. AEXT has written a tutorial to show you how to create a login drop down with Twitter style using jQuery. [...]

  32. Create a Twitter Style Login Form with jQuery | Programming Blog - 20. Nov, 2009

    [...] see the sign in button which will drop down the login form. AEXT has written a tutorial to show you how to create a login drop down with Twitter style using jQuery. It is easy to follow, it also helps you save the space of your webpage and make visitors feel [...]

  33. Online Business Management Software and Services » Blog Archive » Create a Twitter Style Login Form with jQuery - 20. Nov, 2009

    [...] Twitter is running a new homepage with clean and easy design for a while already. Look at the top right of Twitter’s homepage, you’ll see the sign in button which will drop down the login form. AEXT has written a tutorial to show you how to create a login drop down with Twitter style using jQuery. [...]

  34. links for 2009-11-20 « Giri’s Blogmarks - 20. Nov, 2009

    [...] Perfect Dropdown Login Box like Twitter using jQuery | AEXT.NET (tags: jquery tutorials howto) Possibly related posts: (automatically generated)links for 2009-04-28links for 2009-10-26This Week on MA.GNOLIA   [...]

  35. Create a Twitter Style Login Form with jQuery | EMDMA - 20. Nov, 2009

    [...] Twitter is running a new homepage with clean and easy design for a while already. Look at the top right of Twitter’s homepage, you’ll see the sign in button which will drop down the login form. AEXT has written a tutorial to show you how to create a login drop down with Twitter style using jQuery. [...]

  36. BlogBuzz November 21, 2009 - 21. Nov, 2009

    [...] Perfect signin dropdown box likes Twitter with jQuery tweetmeme_style = 'compact'; tweetmeme_url = 'http://www.webmaster-source.com/2009/11/21/blogbuzz-november-21-2009/'; tweetmeme_source = 'redwall_hp'; [...]

  37. Twitter Login Style with jQuery | denbagus blog - 25. Nov, 2009

    [...] of Twitter, you see the sign on the button that will drop down the login form. Tutorial from Aext.net will make an entry to show how to create a logon fall like that jQuery using Twitter.  It is easy [...]

  38. links for 2009-11-26 « dupola's Collections - 26. Nov, 2009

    [...] Perfect Dropdown Login Box like Twitter using jQuery | AEXT.NET (tags: Code JQuery) Posted by dupola Filed in bookmarks Leave a Comment » [...]

  39. 網站製作學習誌 » [Web] 連結分享 - 27. Nov, 2009

    [...] Perfect Dropdown Login Box like Twitter using jQuery [...]

  40. Twitted by faridsafi - 29. Nov, 2009

    [...] This post was Twitted by faridsafi [...]

  41. Create a Twitter Style Login Form with jQuery | LightBlogs - 29. Nov, 2009

    [...] Twitter is running a new homepage with clean and easy design for a while already. Look at the top right of Twitter’s homepage, you’ll see the sign in button which will drop down the login form. AEXT has written a tutorial to show you how to create a login drop down with Twitter style using jQuery. [...]

  42. Twitter Login Style with jQuery | Muktar Is Rocking !!! - 02. Dec, 2009

    [...] of Twitter, you see the sign on the button that will drop down the login form. Tutorial from Aext.net will make an entry to show how to create a logon fall like that jQuery using Twitter.  It is easy [...]

  43. Twitted by loo2k - 03. Dec, 2009

    [...] This post was Twitted by loo2k [...]

  44. 38 jQuery And CSS Drop Down Multi Level Menu Solutions | Theme Center - 05. Dec, 2009

    [...] 7. Perfect signin dropdown box likes Twitter with jQuery [...]

  45. 10+ astonishing jQuery resources to spice up your website | meshdairy - 10. Dec, 2009

    [...] Talking about Twitter and their recent site redesign, I might say I really like the login panel they added. With this excellent tutorial, you’ll learn how to do the same for your website or blog. » View tutorial [...]

  46. Create a Twitter Style Login Form with jQuery « Jbloo - 15. Dec, 2009

    [...] Create a Twitter Style Login Form with jQuery Twitter is running a new homepage with clean and easy design for a while already. Look at the top right of Twitter’s homepage, you’ll see the sign in button which will drop down the login form. AEXT has written a tutorial to show you how to create a login drop down with Twitter style using jQuery. [...]

  47. PHPMan–Live and learn » 38个精美css 和 jQuery 多级下拉菜单实例 - 18. Dec, 2009

    [...] 7. Perfect signin dropdown box likes Twitter with jQuery [...]

  48. 10+ astonishing jQuery resources to spice up your website - 21. Dec, 2009

    [...] Talking about Twitter and their recent site redesign, I might say I really like the login panel they added. With this excellent tutorial, you'll learn how to do the same for your website or blog. » View tutorial [...]

  49. 10 Técnicas JQuery para maximizar tu Sitio Web - 05. Jan, 2010

    [...] Hablando de Twitter, reciente rediseñado, en el aspecto del login bastante cuidado con Ajax, aquí tenéis una técnica para usar con JQuery y darle el aspecto que utiliza Twitter en su página. Ver tutorial >> [...]

  50. Showcase Of Popular Articles From Our Favorite Design Blogs | Bluefaqs - 14. Jan, 2010

    [...] Article Title: Perfect signin dropdown box likes Twitter with jQuery [...]

  51. 20 Best Twitter-likes And Useful Tutorials To Work With Twitter | AEXT.NET - 22. Jan, 2010

    [...] Perfect signin dropdown box likes Twitter with jQuery [...]

  52. Twitter benzeri ajax ve jQuery örnekleri | Javascript | Web Önerilerimiz - 24. Jan, 2010

    [...] jQuery ile twitter benzeri dropdown giriş formu Bu örnek aslında basit bir jquery toggle efekti ile yapılmış bir twitter görünümünde dropdown giriş formudur. [...]

  53. Twitter benzeri ajax ve jQuery örnekleri « blog canpazari - 25. Jan, 2010

    [...] jQuery ile twitter benzeri dropdown giri? formu [...]

  54. Twitter benzeri ajax ve jQuery örnekleri | hurriyetsondakika.net - Son Dakika, Güncel, Türkiye, Dünya - 26. Jan, 2010

    [...] jQuery ile twitter benzeri dropdown giriş formu [...]

  55. Twitter benzeri ajax ve jQuery örnekleri « Bay Bedava – Netten Başlıklar - 27. Jan, 2010

    [...] jQuery ile twitter benzeri dropdown giriş formu [...]

  56. Blog-HemenUlas,WebMaster Bilgileri,Html Kodları,Webmaster bilgileri » Twitter Benzeri Ajax ve jquery örnekleri - 03. Feb, 2010

    [...] jquery ile twitter benzeri dropdown giriş formu [...]

  57. 12 Most Popular jQuery Tutorials In 2009 | JoySpan Magazine - 14. Feb, 2010

    [...] Tutorial | Demo [...]

  58. 50 Coding Techniques For Layouts, Visual Effects and Forms (CSS/jQuery) - Smashing Magazine - 18. Feb, 2010

    [...] [...]

  59. 50 Useful Coding Techniques (CSS Layouts, Visual Effects and Forms) | Web Design Cool - 18. Feb, 2010

    [...] Perfect Drop-Down Log-In Box Like Twitter Using jQueryThis shows you how to create a Twitter-style drop-down log-in form using jQuery. It’s really easy, it saves space on the page and visitors feel comfortable with the awesome toggle form. [...]

  60. 50 Useful Coding Techniques (CSS Layouts, Visual Effects and Forms) - Webreweries.com - 18. Feb, 2010

    [...] Perfect Drop-Down Log-In Box Like Twitter Using jQueryThis shows you how to create a Twitter-style drop-down log-in form using jQuery. It’s really easy, it saves space on the page and visitors feel comfortable with the awesome toggle form. [...]

  61. Wordpress Blog Services - 50 Useful Coding Techniques (CSS Layouts, Visual Effects and Forms) - 18. Feb, 2010

    [...] Perfect Drop-Down Log-In Box Like Twitter Using jQueryThis shows you how to create a Twitter-style drop-down log-in form using jQuery. It’s really easy, it saves space on the page and visitors feel comfortable with the awesome toggle form. [...]

  62. jean philippe gousse » Blog Archive » 50 Useful Coding Techniques (CSS Layouts, Visual Effects and Forms) - 18. Feb, 2010

    [...] Perfect Drop-Down Log-In Box Like Twitter Using jQueryThis shows you how to create a Twitter-style drop-down log-in form using jQuery. It’s really easy, it saves space on the page and visitors feel comfortable with the awesome toggle form. [...]

  63. AMB Album » 50 Useful Coding Techniques (CSS Layouts, Visual Effects and Forms) - 18. Feb, 2010

    [...] Perfect Drop-Down Log-In Box Like Twitter Using jQueryThis shows you how to create a Twitter-style drop-down log-in form using jQuery. It’s really easy, it saves space on the page and visitors feel comfortable with the awesome toggle form. [...]

  64. 50 Useful Coding Techniques (CSS Layouts, Visual Effects and Forms) | theReds1106's Blog - 18. Feb, 2010

    [...] Perfect Drop-Down Log-In Box Like Twitter Using jQuery This shows you how to create a Twitter-style drop-down log-in form using jQuery. It’s really easy, it saves space on the page and visitors feel comfortable with the awesome toggle form. [...]

  65. links for 2010-02-18 - Roger Dickey Jr - 19. Feb, 2010

    [...] Perfect Dropdown Login Box like Twitter using jQuery | AEXT.NET (tags: css login tutorial forms) [...]

  66. 50 Useful Coding Techniques (CSS Layouts, Visual Effects and Forms) « qeqnes | Designing. jQuery, Ajax, PHP, MySQL and Templates - 19. Feb, 2010

    [...] Perfect Drop-Down Log-In Box Like Twitter Using jQuery This shows you how to create a Twitter-style drop-down log-in form using jQuery. It’s really easy, it saves space on the page and visitors feel comfortable with the awesome toggle form. [...]

  67. Barker Design | Graphic & Web Development » Blog Archive » 50 Useful Coding Techniques (CSS Layouts, Visual Effects and Forms) - 19. Feb, 2010

    [...] Perfect Drop-Down Log-In Box Like Twitter Using jQueryThis shows you how to create a Twitter-style drop-down log-in form using jQuery. It’s really easy, it saves space on the page and visitors feel comfortable with the awesome toggle form. [...]

  68. 50 Useful Coding Techniques (CSS Layouts, Visual Effects and Forms) « Free Templates and theme - 19. Feb, 2010

    [...] Perfect Drop-Down Log-In Box Like Twitter Using jQuery This shows you how to create a Twitter-style drop-down log-in form using jQuery. It’s really easy, it saves space on the page and visitors feel comfortable with the awesome toggle form. [...]

  69. 50 Useful Coding Techniques (CSS Layouts, Visual Effects and Forms) | Tutorial51 - 19. Feb, 2010

    [...] Perfect Drop-Down Log-In Box Like Twitter Using jQueryThis shows you how to create a Twitter-style drop-down log-in form using jQuery. It’s really easy, it saves space on the page and visitors feel comfortable with the awesome toggle form. [...]

  70. 50 Useful Coding Techniques (CSS Layouts, Visual Effects and Forms) « eggtea.com - 19. Feb, 2010

    [...] Perfect Drop-Down Log-In Box Like Twitter Using jQueryThis shows you how to create a Twitter-style drop-down log-in form using jQuery. It’s really easy, it saves space on the page and visitors feel comfortable with the awesome toggle form. [...]

  71. Friday Links #89 | Blue Onion Software * - 19. Feb, 2010

    [...] : CodeBlog: Writing a Blogging Extension for Visual Studio 2010 jQuery Quicksand plugin RestSharp Perfect Dropdown Login Box like Twitter using jQuery | AEXT.NET  50 Useful Coding Techniques (CSS Layouts, Visual Effects and Forms) – Smashing Magazine   [...]

  72. 50 Useful Coding Techniques (CSS Layouts, Visual Effects and Forms) | TipTe.com - 20. Feb, 2010

    [...] Perfect Drop-Down Log-In Box Like Twitter Using jQueryThis shows you how to create a Twitter-style drop-down log-in form using jQuery. It’s really easy, it saves space on the page and visitors feel comfortable with the awesome toggle form. [...]

  73. crispycode » CC Links 16 - 21. Feb, 2010

    [...] – Haml Sucks for Content – Less.app: LESS  CSS app – EZ-CSS: An easy to use, lightweight, CSS-Framework – Perfect SignIn dropdown box likes Twitter with jQuery [...]

  74. Perfect signin dropdown box likes Twitter with jQuery | Dev Loom - 22. Feb, 2010

    [...] Perfect signin dropdown box likes Twitter with jQuery Via / @angelceballos [...]

  75. Perfect Dropdown Login Box like Twitter using jQuery | AEXT.NET | [codepotato] - 22. Feb, 2010

    [...] Posted by Gareth on Feb 22, 2010 in Blog0 comments http://aext.net/2009/08/perfect-sign-in-dropdown-box-likes-twitter-with-jquery/ [...]

  76. 50 Useful Coding Techniques (CSS Layouts, Visual Effects and Forms) | BestWebMagazine - 22. Feb, 2010

    [...] Perfect Drop-Down Log-In Box Like Twitter Using jQuery This shows you how to create a Twitter-style drop-down log-in form using jQuery. It’s really easy, it saves space on the page and visitors feel comfortable with the awesome toggle form. [...]

  77. 25 jQuery Tutorials for Creating and Working with Forms « Freelance Web Designer from Hyderabad, India. - 23. Feb, 2010

    [...] Perfect Signin Dropdown Box Like Twitter with jQuery [...]

  78. 16个实用的网页代码编写技巧(CSS布局,视觉效果及表单) | 小影's Blog - 23. Feb, 2010

    [...] Perfect Drop-Down Log-In Box Like Twitter Using jQuery 这篇文章教你如何使用 jQuery 创建一个 Twitter 下拉式风格的登录框,很简单哟。 [...]

  79. Signin Dropdown Box Likes Twitter - 24. Feb, 2010

    [...] Tutorial Tutorial Page [...]

  80. Code List « yourarthere.net - 28. Feb, 2010

    [...] Twitter Login (demo) – Twitter-like drop-down login [...]

  81. 16个SNS网站常用JS组件 - 02. Mar, 2010

    [...] Twitter jQuery下拉注册框 Twitter 的下拉注册框组件。 Demo | [...]

  82. 25 jQuery Tutorials for Creating and Working with Forms | Son Of Byte - Web Design & Development - 04. Mar, 2010

    [...] Perfect Signin Dropdown Box Like Twitter with jQuery [...]

Leave a Reply

CommentLuv Enabled