The pop-up box shows and conceals the problem.

requirement: click anywhere outside the pop-up box, and the pop-up box disappears

my code:

$(document).click(function (e) {
    var _con = $("-sharpregister");
    var _login=$("-sharplogin");
    if (!_con.is(e.target) && _con.has(e.target).length === 0 || !_login.is(e.target) && _login.has(e.target).length === 0 ) {
        $("-sharpregister").hide()
        $("-sharplogin").hide()
    }
})

result: the requirement can be fulfilled, but the click pop-up box itself and its input box will disappear. Solve

Jan.08,2022
The
$(document).click(function(e){
                   if(.currentTarge === e.target){// 
                       //
                   };
            })

keyword is used by e.stopPropagation
in the future, and you need to know more about it.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e2cb-2c406.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e2cb-2c406.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?