javascript - jQuery 2.1 trigger extraParameters not work -
Why not pass additional parameters, as should be in accordance with the documentation?
The same code works correctly jQuery 1.8
& lt; Input type = "checkbox" name = "test" value = "qqq" & gt; $ ('Input [value = "qqq"]'). On ('click', function (event, data) {warning (data);}); $ ('Input [value = "qqq"]'). Trigger ('click', ['QQQ']); Example of work behavior in jQuery 1.8:
UPD1: My solution to this problem:
$ ('input [value] ('Click', function (event, data) {warning (data); if (data! = Zero) $ (this) .prop ('check',! $ (This) prop ('check'))}) ; $ ('Input [value = "qqq"]'). Trigger handler ('click', ['QQQ']);
You will need to use the 'Change' event instead of 'Click'.
$ ('input [value =" qqq "]') On ('change', function (event, data) {warning (date );}); $ ( 'Input [value = "qqq"]'). Trigger ( 'change', [ 'QQQ']);
Comments
Post a Comment