0

I want to make my dialog close after the following function:

function decide(category, choice, price, bool) {
  data.push([category, choice, price, earn]);
}

I have tried playing around with JQuery's close method. I set it as a "characteristic" of the dialog as the guide describes. Does anybody know how I can set the dialog to close after the above function has been triggered?

Would really appreciate any feedback or advice you could give me!!! :)

1 Answer 1

1

Consider the following.

function decide(category, choice, price, bool) {
  data.push([category, choice, price, earn]);
  $(selector).dialog("close");
}

You simply need to call the close method. $(selector) will need to be changed to represent the proper element that Dialog was initialized upon.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.