Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery 1.8 trigger

I'm working on a project for a customer. The site uses jQuery 1.8.2. In a previous project (jQuery 1.9.1) I use:

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

for a custom event. This does not work with 1.8.2.

The error in Firebug:

NS_ERROR_XPC_NOT_ENOUGH_ARGS: Not enough arguments

Anyone here who knows what's wrong with the code?

like image 883
user2087686 Avatar asked Jun 16 '26 04:06

user2087686


1 Answers

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

$("select#testbuecher").triggerHandler("add", [$item]);
like image 114
user2087686 Avatar answered Jun 17 '26 19:06

user2087686



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!