Changed to jQuery to support IE9+.