jQuery / Javascript事件未在<a> tag

时间:2015-04-29 09:59:13

标签: javascript jquery

I am having an issue with event triggering on a <a> tag. The alert doesn't show when it is clicked.

$('.thb-audio-wrapper #fap-play-pause').on("click",function(){ alert('hello'); });

1 个答案:

答案 0 :(得分:0)

尝试使用:

$('.thb-audio-wrapper').on("click", '#fap-play-pause' ,function(){ alert('hello'); });