i want to build a custom event with jQuery that is not set to a DOM element.
It says in the jQuery description, that:
jQuery.event.trigger('test');
is to trigger an Custom Event.
But how i can catch it ??
thx in advance
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I suppose you’re asking about that custom event (at least it made no sense for me attempting to catch the
trigger): it’s done with .bind:UPDATE: Actually no, you don’t need a selector – just an object to be a ‘host’ of event. You might use something like this: