add the same click event to class j code example
Example 1: trigger button click jquery
$("input").trigger("click");
Example 2: class onclick jqery
$(".addproduct").unbind().click(function(){
//do something
});
$("input").trigger("click");
$(".addproduct").unbind().click(function(){
//do something
});