[英]FadeOut div on page load
I am using this code to fadeout a div once my page has loaded. 页面加载后,我将使用此代码淡出div。
$(window).load(function(){
// PAGE IS FULLY LOADED
// FADE OUT LOADING DIV
$('#Loading').fadeOut('fast');
});
Its working fine, however i have a page where i load other pages using JQuery: 它的工作正常,但是我有一个页面,我在其中使用JQuery加载其他页面:
$('.EditCustomer').load("editcustomer_company.php");
The div #Loading
and the fade out function is in a file called settings.php which is included ( <?php include 'settings.php';
) which is on every page (including editcustomer_company.php
) div #Loading
和淡出功能位于一个名为settings.php的文件中,该文件包含在每个页面中(包括< editcustomer_company.php
( <?php include 'settings.php';
editcustomer_company.php
<?php include 'settings.php';
))。
when i visit the page that loads editcustomer_company.php
the #Loading
div appears however does not fade out 当我访问加载editcustomer_company.php
的页面时, editcustomer_company.php
#Loading
div出现,但不会消失
jQuery load
does not perform a load on the window object. jQuery load
不会在window对象上执行加载。 However, there is 'complete' call back that can be used. 但是,可以使用“完整”回调。
$('.EditCustomer').load("editcustomer_company.php", function() {
$('#Loading').fadeOut('fast');
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.