嗨,大家好我需要解決這個問題我有更多<a>
attr。並在不同的點擊時,我會得到相同的網頁我想想和問題是jQuery代碼HREF問題無法修復它
var socialIcons = $(".social a"),
href = socialIcons.attr("href");
socialIcons.on("click",function(e){
e.preventDefault();
setTimeout(function() {
window.location.href = href;
}, 500);
});
你有多少'.social a'? – Huangism
我有5個鏈接.social a – user8722409
這就是爲什麼它不工作,看到由Barmar – Huangism