這種情況在Chrome,Firefox和Safari中間歇性發生。在IE中沒有觀察到。幻燈片顯示比通常情況下更進一步,但按照預期發揮作用。硬刷新更經常發生,看起來像是document.ready()問題。用jQuery循環()幻燈片顯示間歇性定位問題
頁是在這裏:http://privatecare.dreamhosters.com/
正確的負載:
不正確的負載:
jQuery的初始化:
<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery.cycle.all.latest.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#homeSlides').cycle({
fx: 'fade',
speed: 2500
});
});
</script>
HTML:
<div id="homeSlides">
<img src="/g/home/slide1.jpg" alt="Connecting You to Better Care" width="639" height="348" onclick='window.location="/why_choose_pca"' />
<img src="/g/home/slide2.jpg" width="639" height="348" alt="Updates on DOL’s Proposed Amendments to Companionship and Live-In Worker Regulations" border="0" onclick='window.location="/dol-issue-updates"' />
<img src="/g/home/slide3.jpg" alt="Promoting the Rights of Independent Caregivers and Registries Since 1977" width="639" height="348" onclick='window.location="/caregivers"' />
<img src="/g/home/slide4.jpg" alt="The Consumer-Directed Model Puts You in Control" width="639" height="348" onclick='window.location="/comparing_your_options"' />
<img src="/g/home/slide5.jpg" alt="Join us in Orlando October 10 – 12 for the PCA Annual Conference" width="639" height="348" onclick='window.location="/annual-conference"' />
</div>
CSS
#homeWrapper {
position:relative;
margin:0 auto;
width:951px;
background: url(../g/home_bg.jpg) no-repeat;
min-height:888px;
}
#homeSlides {
position:absolute;
left:290px;
top: 143px;
width:639px;
height:348px;
overflow:hidden;
cursor:pointer;
}
沒有人見過這或有什麼建議?
難道是你的圖片尚未加載導致這種差距?你也可以在你的週期中加入鏈接,比如'',而不是那個'onclick = window.location'強迫性的精神錯亂... – JKirchartz 2012-04-17 18:38:38
我的強迫性瘋狂是否會影響這個位置? ;) – jerrygarciuh 2012-04-17 18:44:04
沒了...只是評論:P ...順便說一句,這個差距是相同的高度,在左邊欄中,首先圖像上subnav ... – JKirchartz 2012-04-17 18:45:08