【发布时间】:2016-02-01 20:15:57
【问题描述】:
我有一个在 GM_addStyle 中工作但在 jQuery 中不工作的选择器。我想使用 CSS3 中不可用的 jQuery :contains()。
但是,当我查看源代码时,我的页面上似乎不存在该 ID,但它是动态生成的。
我如何告诉 Tampermonkey 在整个页面加载后运行 JS?
我尝试了不同的 JS @run-at 设置,但没有运气。
//works
GM_addStyle(" \
#T301444200 > tbody > tr.SelPrimary > td:nth-child(1) > nobr > span{ color: red; } \
");
//does not work
$("#T301444200 > tbody > tr.SelPrimary > td:nth-child(1) > nobr > span").css("color","blue","important");
【问题讨论】:
标签: jquery ajax google-chrome tampermonkey