I am having a.php file where is a div in body whose content are to be display using Jquery which is not working. It doesn't display the jquery content in a div as well their's a annchor tag in jquery onhovering its content a div within which is a iframe (in b.php) with a divs content using ajax this should work but am not sure was is it not working .both a.php and b.php are in the same folder
Both in a.php and 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>
Can anyone let me know were I am wrong or is there a better way to achieve it?