bPopup opens centre-aligned in one page and left-aligned in other
by NishitDhakar
HTML
<script src="http://dinbror.dk/downloads/jquery.bpopup-0.9.4.js"></script>
<div id="divAlert"></div>
<div>
<button id="btnSave">Save Click</button>
</div>
JavaScript
$(document).ready(function () {
$("#btnSave").click(
function () {
OpenCompareRequestPrintWindow();
}
);
});
function OpenCompareRequestPrintWindow() {
var x = 20;
var y = 50;
jQuery('#divAlert').empty();
jQuery('#divAlert').append('<div id="popup"><span class="buttonPopup b-close"><span>X</span></span> Hi </div>');
$('#divAlert').bPopup({
follow: [true, true], //x, y
position: [x, y], //x, y
easing: 'easeOutBack', //uses jQuery easing plugin
speed: 450,
transition: 'slideDown'
});
}