I have the following code that works by clicking the button once on a few pages but others I need to click twice.
Code:
<script type="text/javascript">
/*
* jQuery UI Dialog: Open Dialog on Click
*/
$(function () {
$("#dialog").dialog({
autoOpen: false
});
$("#btnAddCustomer").on("click", function () {
$("#dialog").dialog("open");
});
});
</script>