我有一个 iFrame。它的所有元素都已加载。无论如何,我无法通过 id/class/etc 的“部分”使用 jQuery 选择器来选择元素。
这是我的代码:
//Not working
$('#iFrameID').contents().find($('[id^="lodingImg"]')));
//Works
$('[id^="lodingImg"]'))
有谁知道这种类型的 jQuery 选择器是否在 iFrame 中不起作用。我最近读到 .live 也不能在 iframe 中工作。所以,我的问题是我做错了什么或者这是图书馆的限制?
提前致谢。