gpt4 book ai didi

jquery - 如何使jquery弹出,弹出文本

转载 作者:太空宇宙 更新时间:2023-11-04 15:03:40 25 4
gpt4 key购买 nike

http://madaxedesign.co.uk/

在我的主页上,我在页面底部创建了一个名为“get in touch”的 anchor ,它有一个 Contact-pop-up 类,并且在 Jquery 中添加了一个.contact-pop-up到 Jquery,所以 onClick 它将执行脚本,但是当我通过按下联系 anchor 进行测试时,它似乎不起作用。

我想知道是否有人知道为什么会这样?

查询

    $('a.contact , a.contact_footer , a.contact-pop-up').click(function() {
$("#popup").load("contact.php");
// Getting the variable's value from a link
var
show = $('#popup').css('display', 'block'),
popup = $(this).attr('href');

//Fade in the Popup and add close button
$(popup).fadeIn(300);

//Set the center alignment padding + border
var popMargTop = ($(popup).height() + 24) / 2;
var popMargLeft = ($(popup).width() + 24) / 2;

$(popup).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.cross, #mask').live('click', function() {
$('#mask , #popup').fadeOut(300 , function() {
$('#mask').remove();
});
return false;
});

HTML:

   <p>Please take the time to look through my portfolio and if anything interests you or   have any questions, please 

取得联系。

谢谢

最佳答案

也许你想要这样的东西......

HTML:

<div class="popup" id="someId">
<p class="arch-pop-msg">Please take the time to look through my portfolio and if anything interests you or have any questions, please</p>
</div>

JS:

$(".popup").dialog({ modal: true, 
position : 'center',
width: 380,
height: 90,
autoOpen: false,
closeOnEscape: true,
resizable: false,
showTitlebar: false
});

CSS:根据需要添加CSS

关于jquery - 如何使jquery弹出,弹出文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16151242/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com