replaced deprecated jQuery methods