The .alert
div is already at the root of your e
variable DOM contents, so no need to use context parameter (that will cause to find inside your .alert
div for another .alert
div, which won't find anything) so just do like this:
e.width($(window).width()).height($(window).height());
If you were to assign some property to your .messageBox
div, then it would work to use the context parameter like you did:
//this will work as .messageBox is inside your root element(.alert)
$('.messageBox',e).width(...);