なぜこの問題が発生するのかを理解しようとしてきましたが、理解できません。追加されたライブラリに関係していると推測していますが、私は初心者で、さまざまなことを試すのに2日ほど費やしました。ここでの問題は、fancybox を呼び出す関数にありますが、document.ready を呼び出すたびに発生します。
コードは次のとおりです。
<head>
<script type="text/javascript" src="public/scripts/jquery.min.js"></script> <!-- 1.7.2 -->
<script src="public/scripts/applicat.js" type="text/javascript"></script>
<!--Add link fancybox-->
<script type="text/javascript" src="public/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<link rel="stylesheet" href="public/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />
<script type="text/javascript">
$(document).ready(function() {
$("#add-iframe").fancybox({
'hideOnContentClick': true
});
});
</script></head>
<section id="top-comments" style="margin-top: 10px">
<div class="left-side">
<p class="top-comment-title">Michigan</p>
<div class="top-comment-wrapper">
<div class="top-comment-header">
<span class="user-name">Andrew P.</span>
<div class="fix"></div>
</div>
<p class="top-comment-content">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer</p>
</div>
</div>
<div class="right-side">
<p class="top-comment-title">Notre Dame</p>
<div class="top-comment-wrapper">
<div class="top-comment-header dispute-comment">
<span class="user-name">Jenny S.</span>
<div class="fix"></div>
</div>
<p class="top-comment-content">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer</p>
</div>
</div>
<div class="fix"></div>
</section>
<!-- Articles -->
<section id="top-resources" style="display:none; margin-top:10px">
<a id="add-iframe" href="add-link.html" class="top-add-link">Add Link</a>
<div class="left-side">
<p class="top-comment-title">Michigan</p>
</div>
<div class="right-side">
<p class="top-comment-title">Notre Dame</p>
</div>
<div class="fix"></div>
</section>
</div>
<script type="text/javascript" charset="utf-8">
jQuery().ready(function() {
jQuery("#discussion-sections > nav ul").tabs("#discussion-sections > section");
});
</script>
ご協力いただきありがとうございます!ルイス