0
我有以下函數,將「mypage.htm」加載到「#flowplayer-content」中。jquery可以觸發功能問題
這工作
$('.small-images a').bind("click", function(event) {
var uri = "mypage.htm";
$("#flowplayer-content").load(uri, null, function(responseText, textStatus, XMLHttpRequest) {
});
event.preventDefault();
});
「mypage.htm」 包含AHREF。我想打電話給這個事件。
$("a").live("click", function() {
alert("handler hit");
});
,但我似乎不能打它
很奇怪,這看起來很好。你有任何錯誤?你能告訴我們一些來自mypage.html的代碼嗎? – marcgg 2010-03-05 14:23:44
我測試了代碼並正常工作。你一定錯過了什麼。 – rogeriopvl 2010-03-05 14:28:04
我同意其他2,這工作正常。你是否在你的真實代碼中使用event.stopPropagation()而不是event.preventDefault()? – 2010-03-05 14:29:18