Hide div when click outside of same div using jquery

Hide div when click outside of same div using jquery

$(".button").click(function(e){
    $("div").show();
    e.stopPropagation();
});
$("div").click(function(e){
    e.stopPropagation();
});
$(document).click(function(){
    $("div").hide();
});
Freelance Website Designer and Developer

Hire Our Website
Designer and Developer

Recent Solutions

Freelance Website Designer and Developer
Indoc Web Design

Copyright © 2024 All rights reserved
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram