闪烁此页面猫头鹰旋转木马在页面加载
http://www.exclusivecard.co.uk/offers.php
我已经运行几个猫头鹰旋转木马上。你会注意到,当你第一次加载页面时,轮播中的全部内容都会以全角闪烁,直到jquery启动,然后调整所有内容。无论如何阻止这个?生病后的一些代码,我使用下面
的Html
<?php $k='1'; do { ?>
<div id="owlslide<?php echo $k;?>">
<?php do { ?>
<div class="owlItem ">
<-- some other stuff -->
</div>
<?php } while();?>
</div>
<?php $i++; } while();?>
jQuery的(猫头鹰)
$(document).ready(function(){
<?php $i='1'; do { ?>
$("#owlslide<?php echo $i;?>").owlCarousel({
autoPlay: false, //Set AutoPlay to 3 seconds
paginationNumbers: true,
itemsCustom : [
[0, 1],
[450, 1],
[600, 2],
[700, 2],
[1000, 3],
[1200, 4],
[1400, 4],
[1600, 5]
],
//navigation:true,
// navigationText: [
// "<i class=' btn '>< Previous </i>",
// "<i class='btn '>Next ></i>"
// ],
});
<?php $i++; }while($cara = mysql_fetch_assoc($catCara)); ?>
});
您可以添加一些加载器到页面,并在jQuery完成后删除它。 –