Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ways of invoking and receiving a Trigger in a widget
// in your widget
// call the callback event named 'hover' the client code
this._trigger( "hover",
// send e as the original event back as part of the callback
e /* e.type == "mouseenter" */, {
// return the uiObject e.Target in the hovered parameter of the event
// you could also respond with data that the user might need
hovered: $( e.target )
});
// The user can subscribe using an option during initalization
$( "#elem" ).filterable({
hover: function( event, ui ) {
// your response goes here
}
});
// Or with traditional event binding/delegation
$( "#elem" ).bind( "filterablehover" , function( event, ui ) {
// your response goes here
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment