這使我瘋狂,我看不到問題。使用jQuery(我與v 1.6.2 btw,因爲它在CMS內),我試圖通過點擊鏈接顯示內容的div。在jQuery中使用click()時發生event.layerX錯誤
這裏是我的HTML:
<div id="vl-hcp" class="venue">
<h1>Title of venue</h1>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor.</p>
</div>
<div class="venuesScroller">
<a href="javascript:void(0);" class="vl-hcp"><span>Title of venue</span></a>
</div>
這裏是我的jQuery:
$('.venuesScroller a').click(function(){
// Make only currently clicked link active and hide other info boxes
$('.venuesScroller a').removeClass('active');
$('.venue').addClass('hidden');
// Make link active and go through cases for showing text
$(this).addClass('active');
if($(this).hasClass('vl-hcp')) {
$('#vi-hcp').removeClass('hidden');
}
});
但沒有類是在會場的div改變,當我點擊鏈接,並在Chrome(17.0版本.963.56),我得到錯誤:
event.layerX and event.layerY are broken and deprecated in WebKit. They will be removed from the engine in the near future.
任何人都可以看到問題是什麼?我真的被困在這裏。
感謝,
奧蘇
這不是一個錯誤,它的警告。 – 2012-02-23 21:24:14