how to call jquery click function from other jquery function.
i tried by using trigger function it is not working.
Here is my jquery function
$('#index1').click(function(event){
$('#index2').trigger('click');
});
$('#index2').click(function(event){
alert("Hello");
});
i want to call #index2 function from #index1 function.
.trigger()should work. Are you trying to click element or simply execute the click handler? You can try$('#index2').get(0).click()