【发布时间】:2015-04-16 13:59:42
【问题描述】:
如何在 Mootools 中为具有特定元素 ID 的特定标签/元素触发事件?
我有这个:
<a href="youtube-clip...etc" rel="rokbox" id="video_popup" style="display: none;">Video</a>
这个rel="rokbox" 表示该元素将被 Mootools RokBox 模态框使用,但我已经隐藏了链接。
现在,我添加了这段代码:
window.onload = function() {
if(document.readyState == 'complete') {
// point of execution
// here I want to trigger the "a" element I've wrote up before
}
}
代码到达“执行点”,当我设置基本警报时,或其他任何东西。
【问题讨论】:
标签: mootools css-selectors domready