Mobilepopup - jQuery pop-up plugin, confirm modal example




Example of confirm action (demo):


$("body").on("click",".confirm-action",function(){
	$.mobilepopup({
		type:"confirm",
		width:"500px",
		height:"auto",
		closeonoverflowclick: false,
		fullscreeninmobile: false,
		onconfirmed: function(el){
			alert("Action confirmed");
		}
	});
	return false;
});



Example go to link (demo):


$("body").on("click",".confirm-goto-link",function(e){
	e.preventDefault();
	var link = $(this);
	$.mobilepopup({
		type:"confirm",
		width:"500px",
		height:"auto",
		closeonoverflowclick: false,
		fullscreeninmobile: false,
		onconfirmed: function(el){
			location.href = link.attr("href");
		}
	});
	return false;
});