Making a popup login box or popup box with jQuery

Submitted by Anonymous (not verified) on Thu, 12/13/2012 - 23:30

http://www.ericbieller.com/2012/01/05/jquery-tutorial-making-a-login-popupdropdown-box-fade-in-with-only-jquery-and-css/

 

var mouse_inside = false;
$(document).ready(function() {
    $(".login_link").click(function() {
        var loginBox = $("#login_popupbox");
        if (loginBox.is(":visible"))
            loginBox.fadeOut("fast");
        else
            loginBox.fadeIn("fast");
        return false;
    });
 
    $("#login_popupbox").hover(function(){
        mouse_inside=true;
    }, function(){
        mouse_inside=false;
    });
 
    $("body").click(function(){
        if(! mouse_inside) $("#login_popupbox").fadeOut("fast");
    });
});


 

 

Related Items

Website Building with JOOMLA!: A Complete Guide for the Beginner

Joomla is a popular content management system (CMS) . Using joomla package one can easily build website within two-three hours. Website build with joomla is dynamic and updateable . Joomla is conneted with MySQL data base and the script of package is build with PHP.