-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup-js-Jquery.js
24 lines (19 loc) · 963 Bytes
/
popup-js-Jquery.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//Popup-JS-Jquery
$(".eventwrap-list h6").click(function(e){ //Get Target by Click Event.
e.preventDefault();
$(".eventpopup").fadeIn(20,"linear"); //Opening Popeup.
});
$('.crossicon').click(function() { //Get Target Cross Icon by Click Event.
$(".eventpopup").fadeOut("fast"); //Close Popup.
$( ".eventwrap-list h6" ).removeClass( "evnetpopupfind" ); //Removing A Class.
});
$(document).mouseup(function(e) //Start MouseUp Event
{
var container = $(".eventpopup"); //Target Popup Div.
// If the target of the click isn't the container nor a descendant of the container
if (!container.is(e.target) && container.has(e.target).length === 0)
{ // If The Click Takes Place Outside The Container That Is Popup Div.
container.fadeOut("fast"); //Close The Popup.
$( ".eventwrap-list h6" ).removeClass( "evnetpopupfind" );
}
});