I want to pass arguments to the click() handler function in the following case:
function edit_tab(val){
var prev_tab = $("#current_tab").html();
if (prev_tab == 1) {
$('.edit-basic-info').click(a); // here I want to pass some argument "a".
}
}
How can I pass the argument a in the above code? The way I am trying to do is not working.
.click()function (in this question, the function is 'a' and in the original question it is named 'add_event'. (also note that this question was closed by a gold badge holder, I'm more inclined to trust their opinion over yours as to whether or not this is a duplicate)ato the click event if you're not intending to pass it to the function that handles the click event?