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
Merge pull request #2 from klimtog/andrew

Updated jQuery code