i 有一个称为div_1.php的网页,内有一页。
<div id="div_1"></div>
i 网页称为索引。 php with:
<div id="div_menu"></div>
<?php include("div_1.php"); ?>
“div_menu”是真实的。 “div_1”的明显可见度被定为作风。
#div_1{
display: none;
}
j 质量功能显示/“div_1”:
$( .form_name ).click(function() {
// Hide the menu
$( #div_menu ).hide();
if(this.id == "form_choice1"){
// Show the div
$( #div_1 ).show();
}
});
The first part (hiding "div_menu") works fine but second part doesn t work!!! if I copy and paste the content of div_1.php into index.php, It works fine !
Why jQuery cannot access to that div? What is wrong when div is inside a php file? I thought that php include only make a copy of content of called page inside the calling page.