replaced document.getElementById with JQuery code