Change Javascript function to JQuery function

Change Javascript function to JQuery function