Php JQuery附加问题淡出效果
嗨,伙计们!又是我。所以我回到这个话题,我意识到这是JQuery。也许我可以在那里的某个地方放一个淡入淡出的效果。我只是不知道在哪里。如果可能的话,请告诉我在哪里。php帐户实际上包含如下内容Php JQuery附加问题淡出效果,php,jquery,html,fade,Php,Jquery,Html,Fade,嗨,伙计们!又是我。所以我回到这个话题,我意识到这是JQuery。也许我可以在那里的某个地方放一个淡入淡出的效果。我只是不知道在哪里。如果可能的话,请告诉我在哪里。php帐户实际上包含如下内容 $(document).ready(function(){ setInterval(function(){ $('.bopa').load('accounts.php'); },30000); }); 现在它每3秒钟工作一次,内容会发生变化。我先在文本上试一下,这样比较容易。稍后,我计划
$(document).ready(function(){
setInterval(function(){
$('.bopa').load('accounts.php');
},30000);
});
现在它每3秒钟工作一次,内容会发生变化。我先在文本上试一下,这样比较容易。稍后,我计划在图片上执行此操作。您可以向正在发出的AJAX请求添加回调函数:
$command=mysql_query("SELECT * FROM pages order by rand() limit 1");
可改为:
$('.bopa').load('accounts.php');
这还利用了所用jQuery动画函数的回调函数(
.fadeIn()
/.fadeOut()
)。很乐意提供帮助,如果它回答了您的问题,您可以通过单击答案分数旁边的复选标记接受答案吗?
//start by fading-out the element(s)
$('.bopa').fadeOut(250, function () {
//continue by loading the new content now that the element(s) has/have faded-out
$(this).load('accounts.php', function () {
//now that the new content has loaded, fade the element(s) back in
$(this).fadeIn(250);
});
});