0
我完全是jQuery的新手。這可能是我錯過了一些基本的東西,我的代碼看起來像一塊垃圾。如果你喜歡,隨意忽略這個。緩慢的jQuery - 很長的加載時間?
我寫了這段代碼,但有時瀏覽器並沒有迴應我的「clics」,也沒有做任何事情。然後它正常工作,一段時間後它再次卡住。 任何想法?非常感謝!
$(document).ready(function() {
$("#text2").hide();
$("#text3").hide();
$('#ball1').click(function() {
$('#text2').fadeOut('slow');
$('#text3').fadeOut('slow');
$('#text1').fadeIn('slow');
$("#arrow").animate({left:'40px'});
$('#ball2').click(function() {
$('#text1').fadeOut('slow');
$('#text3').fadeOut('slow');
$('#text2').fadeIn('slow');
$("#arrow").animate({left:'400px'});
$('#ball3').click(function() {
$('#text2').fadeOut('slow');
$('#text1').fadeOut('slow');
$('#text3').fadeIn('slow');
$("#arrow").animate({left:'770px'});
});
});
});
});
你可以爲我們製作一個[jsFiddle](http://jsfiddle.com)來模擬這個問題嗎? – Ohgodwhy 2014-11-01 00:17:36
您的其他點擊事件正在處理程序中綁定。 – 2014-11-01 00:18:05
非常感謝您的回覆!不幸的是,我不知道你的意思,以及如何解決這個問題。我需要進一步的教育,是的。你能否向我解釋或重寫代碼?再次,如果你喜歡,請隨時忽略我... – 2014-11-01 00:22:18