jQuery代碼:如何垂直居中jQuery Modal?
function thumb(id,ths) {
if (<?=$loggedin?>) {
$.post(base_url+"index.php/myad/addthumbs", {uniqueid:id});
$(ths).addClass("red");
} else {
_ths=$(ths);
var number = Math.floor(Math.random()*90000) + 10000;
$("#captcha").attr("data-id",id);
$("#captcha").text(number);
$("#pop").modal("show");
}
}
我如何中心模式?請幫助我,並提前致謝。
我在google和stackoverflow上找到了解決方案,但是當它由純jquery構建時,問題是基於bootstrap的模態。
請參閱此鏈接:https://codepen.io/dimbslmh/full/mKfCc – Vijai