Possible Duplicate:
Given this code:
function myFunc(e) {
e.preventDefault();
}
var x = 99;
$('#myId').bind('click', myFunc);
Can someone tell me what is the e parameter. Also how could I pass the x parameter to myFunc ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is the click event, wrapped as a jquery event.
If you want to pass x, you may do this :
Your function will find
xine.data.x.If you need the native event (i.e. not the jQuery one), use
e.originalEventbut many fields of the event are accessible throughe.Reference