You have an extra
$(...)
wrapping your click event handler.
Try this:
$(function() {
$('#openDialog').click(function() {
$("#dialog").dialog();
return false;
});
});
Edit: You'll need to add
return false;
to cancel the click event so that the page doesn't post back to the server. (Thanks to
Member 10272815!)