how to jquery event bind to function
- by sunglim
$(function(){
$("#btnExcelRead").click(CheckValidation);
});
var CheckValidation = function() {
if ($("#excelUpload").val() === "") {
alert("Select file");
return false;
}
if ($("$txtStartDate").val() === "") {
alert("Check the start date!");
return false;
}
if ($("$txtEndDate").val() === "") {
alert("Check the end date!");
return false;
}
}
here i made simple jquery code.
I want to bind function when btnExcelRead button click.
is this originally wrong way?