Skip to content

Instantly share code, notes, and snippets.

@wrongkitchen
Created November 6, 2012 16:41
Show Gist options
  • Save wrongkitchen/4025897 to your computer and use it in GitHub Desktop.
Save wrongkitchen/4025897 to your computer and use it in GitHub Desktop.
Javascript: Fancybox Alert
var alert = function (pText){
jQuery.fancybox({
'padding' : 0,
'margin' : 0,
'modal' : true,
'centerOnScroll' : true,
'width' : 470,
'height' : 190,
'padding' : 0,
'overlayOpacity' : 0.9,
'overlayColor' : '#000',
'content' : "<div><a href=\"javascript:void(0)\" onclick=\"$.fancybox.close()\"><div class=\"close-alert\"></div></a>"+pText+"</div>"
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment