Mercurial > agora-palash
view static/js/agora.js @ 107:2bca07be6e51
Add login popup box
So you can log in and immediately be redirected to the same page. Sort
of like what reddit has. If Javascript is disabled, the user is simply
taken to the standard login page.
author | dellsystem <ilostwaldo@gmail.com> |
---|---|
date | Tue, 11 Sep 2012 20:23:51 -0400 |
parents | |
children | 00c71a6192de |
line wrap: on
line source
(function ($) { // Handle showing the login popup var handleLoginLink = function () { var loginLink = $('.login-link'); if (loginLink.length) { loginLink.click(function () { $('#login-popup').show(); return false; }); $('#login-popup').click(function (event) { // Only catch events in the outer, overlay div if (event.target === this) { $(this).hide(); } }); } }; $(document).ready(function () { handleLoginLink(); }); })(jQuery);