I have created a form that floats in the center of the screen
On this form, I have included a button designed to close it
However, I would like for the form to be closed anywhere on the screen when clicked with the mouse
Here is my code:
$(".offer-close").click(function () {
$(".div-fix").fadeOut(500);
});
<div class="div-fix">
<div class="offer-shop">
<div class="cur-package">
<div class="offer-close"><i class="fa fa-times"></i></div>
<h6>Service</h6>
<div class="pack-b">
<div class="pack-price">6500 <div>
<br>
<div class="pack-shop"><a href="#" target="blank">Buy</a></div>
</div>
<div class="pack-c">any ...</div>
</div>
</div>
</div>
For example, check out this feedback form website: