Jquery run function from child window in parent window
问题 I have a popup window and I want to run a function from in the parent window. In the child I have: $(document).ready(function(){ parent.$.fn.guestFromPop('Action'); }); In the parent I have: $(document).ready(function(){ function guestFromPop(data) { alert(data); } }); The problem is when parent.$.fn.guestFromPop('Action'); I never see the alert, nothing happens. Am I doing something wrong? 回答1: This doesn't declare the function $.fn.guestFromPop : $(document).ready(function(){ function