I want to trigger this jquery function by using trigger method of JQuery. How can I do that ? Actually I dont even know the trigger method is suitable for user defined functions.
$('a.pop').click(function() {alert('testing'); }
this is not working
$('a').trigger(testtt);
var testtt = function(){ alert('aaa');}
Very similar to the way you install the event handler:
If you have the name of the event you want to trigger as a string, you can also do it this way:
This is also the solution to use if you want to pass crafted data to the event handler —
triggeralso accepts a second parameter.