gpt4 book ai didi

javascript - 2 内联 fancybox,第二个 fancybox 出现错误 "The requested content cannot be loaded"

转载 作者:行者123 更新时间:2023-11-28 01:52:59 24 4
gpt4 key购买 nike

第二个 fancybox 会给我一个错误“无法加载请求的内容”寄存器。 inlog fancybox 对我来说工作正常,有什么问题吗?我用 Google 搜索了一下,他们说了一些 iframe 类型的内容,但是当我这样做时,加载图标会不断旋转并且不显示内容。

jQuery

$(document).ready(function() {
$("a.inlog").fancybox({
maxWidth : 250,
maxHeight : 100,
fitToView : false,
autoSize : false,
closeClick : false,
openEffect : 'none',
closeEffect : 'none'
});
});
$(document).ready(function() {
$("a.register").fancybox({
maxWidth : 250,
maxHeight : 100,
fitToView : false,
autoSize : false,
closeClick : false,
openEffect : 'none',
closeEffect : 'none'
});
});

HTML

<div class="login-bottom"> <a class="decoration inlog" href="#inlog"><span class="knop-text">login</span></a>

<div id="inlog" style="display: none;">
<form class="form" action="">
<label>Gebruikersnaam:</label>
<input class="input" type="text" name="fname" />
<br />
<label>Wachtwoord:</label>
<input class="input" type="password" name="lname" />
<br />
<input class="submit" type="submit" value="login" />
</form>
</div>
</div>
<div class="login-bottom"> <a class="decoration register" href="#register"><span class="knop-text">registreer</span></a>

<div id="#register" style="display: none;">
<form class="form" action="">
<label>Gebruikersnaam:</label>
<input class="input" type="text" name="fname" />
<br />
<label>Wachtwoord:</label>
<input class="input" type="password" name="lname" />
<br />
<label>LoL gebruikersnaam:</label>
<input class="input" type="text" name="fname" />
<br />
<label>E-mail:</label>
<input class="input" type="text" name="fname" />
<br />
<input class="submit" type="submit" value="login" />
</form>
</div>
</div>

最佳答案

您应该使用 # 来引用特定的选择器,ID.(点)你的 jQuery 代码,但不在你的 html 中,所以这个

<div id="#register" ...

应该是这个

<div id="register" ...

修正后工作 JSFIDDLE

关于javascript - 2 内联 fancybox,第二个 fancybox 出现错误 "The requested content cannot be loaded",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19480052/

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