jQuery
$('a.popup').click(function(){
window.open( this.href, 'Page title', 'width=600, height=650' );
return false;
});
HTML
<a class="popup" href="sample.html">
I want to hide the header and footer if my sample.html page is opened in a popup window. Can I add a class name to the <html> or <body> to the popup?, so I can add the CSS rules. Thanks!
from
sample.htmlin the<head>section just check ifwindow.openerexists, e.g.then you can set your own CSS style using class
.popup, e.g.