我希望你们中的一个人可能会指出我在正确的方向关于我有一个问题,我有一个jquery auto_refresh函数 - 代码如下 - >严,刷新和一切,但悲伤地它看起来丑陋。 O.o当刷新发生时,它闪烁不成比例。显然,必须有这样做的更加平滑的方式...问题与jquery自动刷新功能
<script>
var auto_refresh = setInterval(
function()
{
$('#basic').load('resources_basic.php');
}, 1000);
$(function() {
$("#draggable_res").draggable();
});
</script>
<div id="draggable_res" class="ui-widget-content">
<h5> Resources </h5>
<div id="Accordion1" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab">Basic Resources</div>
<div class="AccordionPanelContent">
<div id="basic"><?php include 'resources_basic.php'; ?></div>
</div>
</div>
<table width="160" border="2" cellspacing="2" cellpadding="2">
<tr>
<td width="30"><img src="images/product/gold.gif" width="30" height="30" alt="Gold" /></td>
<td width="110"><?php echo $row_resourcesbasic_rs['gold']; ?></td>
</tr>
<tr>
<td width="30"><img src="images/product/wood.gif" width="30" height="30" alt="Wood" /></td>
<td width="110"><?php echo $row_resourcesbasic_rs['wood']; ?></td>
</tr>
<tr>
<td width="30"><img src="images/product/clay.gif" width="30" height="30" alt="Clay" /></td>
<td width="110"><?php echo $row_resourcesbasic_rs['clay']; ?></td>
</tr>
<tr>
<td width="30"><img src="images/product/stone.gif" width="30" height="30" alt="Stone" /></td>
<td width="110"><?php echo $row_resourcesbasic_rs['stone']; ?></td>
</tr>
</table>
感谢提前:)
试过了。 :)仍然丑陋:( – 2013-04-24 17:57:19
丑陋..?它看起来像什么样子?? – 2013-04-24 17:58:00
Nevermind !!!我试过了:不完全像你的... var auto_refresh = setInterval( function() { $('#基本')。load('resources_basic.php')。fadeIn(“slow”); },1000); – 2013-04-24 18:10:03