每次用户单击链接时,脚本都应检查文档。如果 href
为 #,则脚本应显示 ID 为 video 的 div。
(我需要这个特定的片段作为图像库的补丁。我在使用 title
属性来获取图库中不同图像的特定内容时遇到问题。)
伪代码:
If user clicks <a> with href="#"
Show div #video
最佳答案
$('a[href="#"]').click(function(){
$("#video").show();
});
关于javascript - 当用户单击 href "#"的链接时显示 <div>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4284558/