What are event and UI parameters in jQuery Dialog? Can I get a mouse position using them?
$( ".selector" ).dialog({
open: function(event, ui) { ... }
});
What are event and UI parameters in jQuery Dialog? Can I get a mouse position using them?
$( ".selector" ).dialog({
open: function(event, ui) { ... }
});
The
event
parameter is the DOM Event object. Theui
parameter is typically a hash; its properties depend on the event being raised.For the dialog
open
event, both arguments appear to be null. For other events, such asdragStart
,drag
anddragStop
,ui
will contain the current position and offset: