Fixed resize handling to use jQuery only