[英]How to hide a div on page load which is in another php file
I have a php file where I include multiple php files and their respective javascript files. 我有一个php文件,其中包含多个php文件及其各自的javascript文件。
In the ajax .done(function(){ })
I reload my main page which includes all the other files. 在ajax
.done(function(){ })
我重新加载了包含所有其他文件的主页。 So is there any way to hide the div which is inside another php page? 那么有什么办法可以隐藏另一个PHP页面中的div?
code: 码:
.done(function (msg) {
$('#abc').load('list.php').fadeIn("slow");
});
list.php
is the main file. list.php
是主文件。 Help? 救命?
You can use $("#page1").hide()
. 您可以使用
$("#page1").hide()
。 And then when you're ready $("#page1").show()
然后当你准备好
$("#page1").show()
Alternatively using a CSS class with display: none
and then removing the class or using $("#page1").toggleClass("anotherclass")
to switch between a second class. 或者,使用带
display: none
的CSS类display: none
,然后删除该类,或使用$("#page1").toggleClass("anotherclass")
在第二个类之间进行切换。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.