📅  最后修改于: 2022-03-11 15:01:18.101000             🧑  作者: Mango
//1st way
$(".searchCategory").click(function () {
//your code here
});
//2nd way
$(".searchCategory").on( "click",getCategory); // getCategory is a function but don't need the pharenthesis
//if you write getCategory() instead of getCategory when getCategory is a function with no pharamenters it might not work