I am using jqueryui/1.9.2/jquery-ui.min.js
for pop up dialog. This is my code
$("#button_id").on("click", function(){
$("#dialog").dialog("open");
})
When i click on button in first time it's pup up dialog as normal but after dialog close. Than I click on it again, It's show message like this
Error: cannot call methods on dialog prior to initialization; attempted to call method 'open' like in image.
How to resolve it.