Let's say I have ten different dialog popups, each with their own inits and options.
How would I call a function when any of the dialog is open? i.e. the correct syntax for the following:
$(if("*").dialog("open")) $(// do this);
Let's say I have ten different dialog popups, each with their own inits and options.
How would I call a function when any of the dialog is open? i.e. the correct syntax for the following:
$(if("*").dialog("open")) $(// do this);
Copyright © 2021 Jogjafile Inc.
You can listen to the
dialogopen
event emitted by jQuery UI to execute a function whenever a dialog is opened.For example:
Or bind the listener to
document
on case of dynamically generated dialogs: