我從下面的鏈接下載了登錄模式。 http://www.alessioatzeni.com/blog/login-box-modal-dialog-window-with-css-and-jquery/我如何獲得這個模式窗口打開負載 - PHP
我對CSS做了一些更改,但就是這樣。
這裏是jQuery的代碼,啓動模式窗口,當我按一下按鈕..
$(document).ready(function() {
$('a.loginbutton').click(function() {
// Getting the variable's value from a link
var loginBox = $(this).attr('href');
//Fade in the Popup and add close button
$(loginBox).fadeIn(300);
$.fn.formLabels(); //Initialize form labels
//Set the center alignment padding + border
var popMargTop = ($(loginBox).height() + 24)/2;
var popMargLeft = ($(loginBox).width() + 24)/2;
$(loginBox).css({
'margin-top' : -popMargTop,
'margin-left' : -popMargLeft
});
// Add the mask to body
$('body').append('<div id="mask"></div>');
$('#mask').fadeIn(300);
return false;
});
// When clicking on the button close or the mask layer the popup closed
$('a.close, #mask').live('click', function() {
$('#mask , .login-popup').fadeOut(300 , function() {
$('#mask').remove();
});
return false;
});
});
基本上,我需要這個模式在網頁加載加載。我幾乎不瞭解jQuery,因此我下載了插件。我真的需要這個工作。
我已經試着聯繫編寫此代碼的人,但他從未回覆過。