Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event.trigger needs to send an optional parameters like jQuery's Events do #35

Open
budarin opened this issue Dec 26, 2014 · 7 comments

Comments

@budarin
Copy link

budarin commented Dec 26, 2014

Event.trigger needs to send an optional parameters like jQuery's Events do

@kupriyanenko
Copy link
Owner

Hi @budarin,

I think it can be useful, added to development scope.

@kupriyanenko
Copy link
Owner

Like temporary workaround you can use next code:

$('#el').trigger($.Event('eventType', {
    key: 'value'
}));

jQuery have the same interfaces, this code is 100% compatible.

Full support for constructions like $("#foo").trigger( "custom", [ "Custom", "Event" ] ); will be implemented a little bit later.

@budarin
Copy link
Author

budarin commented Feb 3, 2015

Hi Alex!

@kupriyanenko
Copy link
Owner

Hi @budarin,

$("#foo").trigger( "custom", [ "Custom", "Event" ] ); it's what you want? Or you need something other?

@budarin
Copy link
Author

budarin commented Feb 3, 2015

should I always put second parameter as array or as object too?

@Sebastian-Fitzner
Copy link

Is there any update? Would be great to have the following functionality:

$('#foo').trigger( 'custom',  {'custom': 'object'});

@kupriyanenko
Copy link
Owner

It's still not implemented, but I think I will improve it during the week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants