Jquery 1.8 trigger

I am working on a project for a client. The site uses jQuery 1.8.2. In a previous project (jQuery 1.9.1) I am using:

$("select#testbuecher").trigger("add", [$item]);

      

for a custom event. This doesn't work as of 1.8.2.

Firebug error:

NS_ERROR_XPC_NOT_ENOUGH_ARGS: not enough arguments

Anyone who knows what is wrong with the code?

+3


source to share


1 answer


I found a solution. Instead of using just a "trigger", "triggerHandler" does the job.



$("select#testbuecher").triggerHandler("add", [$item]);

      

+2


source







All Articles