Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.7k views
in Technique[技术] by (71.8m points)

h5开发,$("#link").tap()为什么触发不了?console也没有报错

$('.recommendClick').off("tap"); 
$('.recommendClick').on("tap", function() {
        $("#input-box").val($(this).text());
        $("#link").tap()
        });

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

你的题目和你的代码是两回事呀

$("#link")$('.recommendClick') 这选到的是一个东西吗?

而且触发事件不应该用 trigger 吗?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...