Loading ...

Pass params to jquery trigger function: | CodeAsp.Net

jquery: Pass params to jquery trigger function

 /5
0 (0votes)

Below is the code to show how to pass params to jquery trigger function:

$('#TestAnchor').on('foo', function(event, param1, param2) {
    alert(param1);
    alert(param2);
});

$('#TestAnchor').trigger('foo', ['one', 'two']);

 

Live: http://jsfiddle.net/raghav_khunger/MwzJh/

Comments (no comments yet)

Top Posts