Rafał Developer
Rafał Developer

Reputation: 2055

close pop-up and refresh website

Do you know how should I write correct method click?

JS - here I made mistake

$(".ui-dialog-titlebar-close").live("click", function (e) {
    window.setTimeout('location.reload()', 100);
});

There is class with button

enter image description here

Upvotes: 0

Views: 49

Answers (1)

Anujith
Anujith

Reputation: 9370

Try:

$(document).on("click", ".ui-dialog-titlebar-close", function (e) {
      e.preventDefault();
      window.setTimeout('location.reload()', 100);
});

Upvotes: 2

Related Questions