<section class="msg-pop" id="ApplyMBox"> <span class="msg-pop-head"><span class="msg-headtext"><h3 id="ApplyHead"></h3></span></span> <section class="share-pop-inr"> <span class="clr"><label id="ApplyMsg"></label></span> <section class="ok-button"> <input type="button" value="OK" class="butn-style-01 shr-btn-02" name="" id="Updatepopbtn"> <span class="clr"></span> </section> <!-- stop: share privacy settings --> <span class="clr"></span> </section> <span class="clr"></span> </section>
function ApplyComplete() { if ($("#ApplyTarget").contents().find("#ApplyStatus").length > 0) { var res = $("#ApplyTarget").contents().find("#ApplyStatus").html(); $("#ApplyHead").html("Message"); $("#ApplyMsg").html(res); $("#ApplyMBox").show(); $("#ApplyMBox").center(); $("#ApplyBG").show(); } } jQuery.fn.center = function () { this.css("position", "absolute"); this.css("top", Math.max(0, (($(window).height() - $("#ApplyMBox").outerHeight()) / 2) + $(window).scrollTop()) + "px"); this.css("left", Math.max(0, (($(window).width() - $("#ApplyMBox").outerWidth()) / 2) + $(window).scrollLeft()) + "px"); return this; }
You can just use another CSS style, try position: fixed
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)