【发布时间】:2014-03-08 14:56:58
【问题描述】:
我有一个 .php 文件,其中是正文中的一个 div,其内容将使用不工作的 Jquery 显示。它不显示 jquery 内容 一个 div 以及他们的 jquery 中的一个锚标签 onhovering 其内容 一个 div 是一个 iframe (在 b.php 中)与一个使用 ajax 的 divs 内容这应该可以工作,但我不确定它是否不工作。a.php 和b.php 在同一个文件夹中
在 a.php 和 b.php 中:
a.php:
$("document").ready(function()
{
$("#pcontent").html('');
$("#pcontent").append('<div class="product"><div class="title1"><div class="title">fdfsfsd</div><div class="title"> <a class="reference">sdfsf</a></div><div id="showdata"></div></div></div>');
$("#pcontent").fadeIn(1);
$(".reference").hover(function()
{
$("#showdata").css("display","block");
$.ajax({
url:"b.php",
type:"GET"
});
});
});
<div id="pcontent"></div>
b.php:
$("document").ready(function()
{
$("#pcontent").html('');
$("#pcontent").append('<div class="product"><div class="title1"><div class="title"><b> ghgj</b></div><div class="title"> hjhk</div></div></div>');
$("#pcontent").fadeIn(1);
});
<iframe id="pcontent" width="100px" height="10px"></iframe>
谁能告诉我我错了还是有更好的方法来实现它?
【问题讨论】:
-
你包含了 jQuery 吗?
-
你正在使用...更新了代码
-
你为什么要包含 jquery 两次?这会导致问题
-
为什么要包含 jquery 1.3 和 jquery 1.8?
-
对两个 szpic BeatAlex .... 已删除 jquery1.3 知道它显示了 a.php 的内容。但是 b.php 的 iframe 没有出现在显示数据 div 确实出现的悬停位置
标签: jquery iframe jquery-hover