Updated jQuery code

Added missing </select> to the dropdown list for API command which was
causing the div failure.
Updated divs to use id instead of class
Updated jquery code to use document.on