Is it possible to add a class when popup is open?
Is it possible to add a class when a 开发者_运维技巧popup is open using window.open
with javascript or jquery?
With jQuery you can access the opened window's properties.
var newWind = window.open('http://<url_here>', 'childWindow')
$j(newWind.document).find('html').addClass('opened-as-popup')
Another solution:
var WindowObject = window.open('');
WindowObject.document.write('<body class="newClass">');
精彩评论