爲什麼經過多次點擊按鈕,是否會掛起網站?我使用函數.load()來加載內容(html)。我用螢火蟲解決這個問題,但沒有成功。
我的目的就是這個按鈕:
加載內容時無法刷新的問題.load()
http://i.stack.imgur.com/ElWXy.gif
你自己能看到我的網站:http://zigweb.ir/siran/
,可以看到這個js代碼來解決:http://zigweb.ir/siran/files/js/admin.js
$('#icon a').click(function (event) {
event.preventDefault();
var id = '#' + this.id;
var title = $(id).attr('title');
$(".title").toggleClass("suject").html(title);
var url = $(id).attr('href');
$('.table_show, #num_count, #select_box, #input_search').fadeOut('slow', function() {
$('.results').load(url+' .load', function(){
$(this).hide().show();
$.getScript("http://zigweb.ir/siran/files/js/admin.js");
})
//.hide().show("slow")
});
});
請告訴我,我該怎麼辦?
尊重
uhm'http://localhost/Siran-mehdi/files/js/admin.js'反映到本地服務器,而不是Internet上的服務器。這可能是您的問題的一個原因。 – reporter
對不起,現在編輯可以檢查。 –
另一個問題:是否只有三個第一個按鈕不起作用?使用您的網站作爲Persish的非(本地)演講者是一個小挑戰。^^ – reporter