{"id":1126,"date":"2012-07-25T19:05:16","date_gmt":"2012-07-25T19:05:16","guid":{"rendered":"http:\/\/www.phpmind.com\/blog\/?p=1126"},"modified":"2012-07-25T19:05:57","modified_gmt":"2012-07-25T19:05:57","slug":"how-to-close-colorbox-when-clicking-on-a-link","status":"publish","type":"post","link":"https:\/\/www.phpmind.com\/blog\/2012\/07\/how-to-close-colorbox-when-clicking-on-a-link\/","title":{"rendered":"How to close colorbox when clicking on a link?"},"content":{"rendered":"<p>Colorbox is very cool js plug-in which is used by many developers. <\/p>\n<p>I was creating a facebook app and had  situation where i wanted to close Colorbox\/popup and open new page which was not suppose to open in Colorbox. <\/p>\n<p>I was searching and found really simple code which can be used in several ways with any php technology stuff.<\/p>\n<pre lang=\"javascript\">\r\n<a onclick=\"parent.$.fn.colorbox.close();\" href=\"http:\/\/www.phpmind.com\" target=\"_top\">PHPMIND.COM<\/a> This is good for normal site\r\n\r\n<a onclick=\"parent.$.fn.colorbox.close();\" href=\"http:\/\/www.phpmind.com\" target=\"_parent\">PHPMIND.COM<\/a> This works when we have Iframe like in facebook apps \r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Colorbox is very cool js plug-in which is used by many developers. I was creating a facebook app and had situation where i wanted to close Colorbox\/popup and open new page which was not suppose to open in Colorbox. I was searching and found really simple code which can be used in several ways with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[43,30],"tags":[],"class_list":["post-1126","post","type-post","status-publish","format-standard","hentry","category-colorbox","category-jquery"],"_links":{"self":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1126","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/comments?post=1126"}],"version-history":[{"count":2,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1126\/revisions"}],"predecessor-version":[{"id":1128,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1126\/revisions\/1128"}],"wp:attachment":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/media?parent=1126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/categories?post=1126"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/tags?post=1126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}