Remove jQuery deprecated features in javascript code