[問題] jquery animate問題
我想做網頁內容click後
經過jquery的animate動畫往左滑
然後再換頁
但現在我一click後就直接換頁
不會等動畫結束
附上程式碼:
$('div').click(function () {
$(this).animate({ 'left': '-1000px' }, 2000);
document.location.href = "Default.aspx";
})
不知道有什麼方法解決
感謝~
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 125.227.255.80
※ 文章網址: http://www.ptt.cc/bbs/Web_Design/M.1420795246.A.9E1.html
推
01/09 17:46, , 1F
01/09 17:46, 1F
推
01/09 18:12, , 2F
01/09 18:12, 2F
→
01/09 18:13, , 3F
01/09 18:13, 3F
推
01/10 00:38, , 4F
01/10 00:38, 4F
→
01/10 00:38, , 5F
01/10 00:38, 5F
→
01/10 11:15, , 6F
01/10 11:15, 6F