I had the same problem and found a solution. I believe that jquery's custom event handling is tied to the instance of jquery loaded on the page, so the iframe is adding events to its own jquery context, and not the one of the parent.
Edited: So the trick is to just use the jquery from the parent, as in parent.$(parent.document) etc.
Now when you add custom events they will work. Here's what worked for me :
parent.html
- $(document).bind('yourproject.namespace.successfulSignIn', function(e) {
- //etc.
- });
iframe.html
- parent.$(parent.document).trigger("yourproject.namespace.successfulSignIn");