<body> <div id="text">Hello</div> </body> <script> $(document).on('mouseup', function (e) { var text= $('#text'); if (!text.is(e.target) && text.has(e.target).length === 0) { text.hide(); } }); </script>
No comments:
Post a Comment