XUL and event triggers

XUL and event triggers


Hi All,
I'm working on a browser extension that needs to trigger a click on an
element in the content document.
I've seen that there appear to be some issues with jQuery in a XUL
environment, but everything is really vague and apparently work-
aroundable
So: I can access the element with selectors, change its HTML properly,
and toggle("slow") without any issues. However, when I
trigger("click") it throws an error. When I trigger("!click") it
doesn't throw an error - but nothing happens, either. For instance, my
element is:
$("img[name=foo]")
my original plan was to click it as follows:
$("img[name=foo]").trigger("click")
Just to be on the safe side, I've been going directly to the <a
href=...> enclosing it:
$("img[name=foo]").parent().trigger("click").toggle("slow")
This throws an error at the trigger without toggling.
$("img[name=foo]").parent().trigger("!click").toggle("slow")
This "ignores" the trigger (but doesn't throw an error) and executes
the toggle successfully
Why would namespacing have anything to do with this??
...
In summary, I'm really curious about this issue and it seems readily
fixable. Any ideas?