The dialog <div> is, rather than being built by jQuery, actually built on the page with the dropdown menu inside. The dropdown has an ID that can easily be used by jQuery/ JavaScript to capture the value and display it when the OK button is pressed.