Replaced deprecated $.fn.live with $.fn.on