alert with background mask by jquery.? [closed]
how is make a alert with background mask(mask is for full page)? (i don't want use of plugin)
Explanation: After click on a button or link, show an alert with the background mask.
Like demo in here=> http://thrivingkings.com/apprise/
On the demo you have custom built solution with a lot of options. Without using any plugins or custom scripts - you will not be able to customize alert dialog.
very, very simple sample:
.alert { width:200px; height:80px; margin:-40px 0 0 -100px; position:absolute; left:50%; top:50%; background:red; text-align:center; }
$('#btnAlert').click(function () {
var $alertDiv = $('<div class="alert">This is the alert text.</div>');
$('body').append($alertDiv);
$alertDiv.click(function () {
$(this).fadeOut(100);
});
$alertDiv.fadeIn(100);
});
精彩评论