Wednesday, March 3, 2010

How to Get Parent Window in Jquery



Consider the following script:

$("#btn").click(function(){ 


        window.opener.$("#chk_accept-terms").attr("checked","checked"); 
        window.close(); 




}); 

The above code first check the check box present on parent window ( window that open the popup or child window) and  then close the child window.

No comments:

Post a Comment