I have jQuery dialog with buttons. When user clicks on button, it take some time, to make ajax call and do some stuff. During this time, user is able to click again and again. I want to avoid this behaviour.
I know, that jQuery has method One(). Which would exactly do what I want. But how to achieve this on dialog buttons?
My current code is:
$d.dialog({
buttons: [
{
text: "Potrdi",
click: function() {
// do some stuff
}
}
]
});