jquery close another dialog

JavaScript
$("#modalSearch").dialog('close');
Source

Also in JavaScript: