Professional Documents
Culture Documents
ready(function() {
$(document).ready(function() {
$('#sansmaranIsHere').fadeIn();
// append div with id fade into the bottom of body tag // and we allready styled it in our step 2 : CSS $('body').append('<div id="fade"></div>'); $('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn();
// Now here we need to have our popup box in center of // webpage when its fadein. so we add 10px to height and width var popuptopmargin = ($('#' + popupid).height() + 10) / 2; var popupleftmargin = ($('#' + popupid).width() + 10) / 2;
// Then using .css function style our popup box for center allignment $('#sansmaranIsHere').css({ 'margin-top' : -popuptopmargin, 'margin-left' : -popupleftmargin }); });
});