Maximizes the given element or query string and listens on window.resize.