I have a situation where iframe triggers click event for parent window and passes argument to the parent. I have tried below code but the argument is undefined. Don’t know what am I doing wrong.
Code in iframe
jQuery("#add",window.parent.document).trigger('click',"3");
Code in parent window-
jQuery("#add").live('click',function(e,cid){
//cid is undefined
});
Please help.
Thanks.
Applicable only if iframe src is from same domain as parent.
parent window
inside iframe