Reputation: 1143
I am wondering why this works when put on my parent's HTML page:
$("#assessmentsTab").trigger("click");
but this does not work inside of my iFrame:
$("#assessmentsTab", window.parent.document).trigger("click");
Does anybody have any insight?
I have this function as well which works and successfully updates the CSS:
$("#assessmentsTab", window.parent.document).css({"color":"white", "background":"#3D4C53"});
Fixed the issue!
The correct syntax is:
window.parent.$("#assessmentsTab").trigger('click');
Upvotes: 0
Views: 339
Reputation: 16438
Do this to trigger the click from within the iframe, to the parent
window.parent.$("#assessmentsTab").trigger('click')
Upvotes: 1