Popup on click
Budget: $10 – $30 USD
I have the following exit intent popup script
And I want to show this popup on click
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<div id="Blanket-148" style="position:fixed; left:0px; top:0px; width:100%; height:100%; background-color:#000000; z-index:99997; opacity:0.75; display:none;"></div>
<div id="PopUp-148" style="position:absolute; top:25px; width:610px; left:50%; transform: translate(-50%, 0); max-width:80%; z-index:99999; display:none;">
</div>
<script type='text/javascript'>
jQuery(document).ready(function($){
jQuery.get("https://buildwithblox.com/popups/148", function(data){
jQuery('#PopUp-148').html(data);
});
});
function closePopUp(){
jQuery('#PopUp-148').css('display', 'none');
jQuery('#Blanket-148').css('display', 'none');
}
pc_exit_shown=false;
$(document).mouseleave(function(){
ShowPop();
});
function ShowPop(){
if (pc_exit_shown){return false;}
pc_exit_shown=true;
window.scrollTo(0,0);
$('#Blanket-148').css('display','block');
$('#PopUp-148').css('display','block');
}
</script>
And I want to show this popup on click
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<div id="Blanket-148" style="position:fixed; left:0px; top:0px; width:100%; height:100%; background-color:#000000; z-index:99997; opacity:0.75; display:none;"></div>
<div id="PopUp-148" style="position:absolute; top:25px; width:610px; left:50%; transform: translate(-50%, 0); max-width:80%; z-index:99999; display:none;">
</div>
<script type='text/javascript'>
jQuery(document).ready(function($){
jQuery.get("https://buildwithblox.com/popups/148", function(data){
jQuery('#PopUp-148').html(data);
});
});
function closePopUp(){
jQuery('#PopUp-148').css('display', 'none');
jQuery('#Blanket-148').css('display', 'none');
}
pc_exit_shown=false;
$(document).mouseleave(function(){
ShowPop();
});
function ShowPop(){
if (pc_exit_shown){return false;}
pc_exit_shown=true;
window.scrollTo(0,0);
$('#Blanket-148').css('display','block');
$('#PopUp-148').css('display','block');
}
</script>