Can I pass an additional parameter to this function?
$("#foold").click( function(e) {
// CODE
};
For example, I need to pass some X value to this function. Can I write something like this:
<a href="javascript:void(X)" id="fooId">Foo</a>
to pass value in this function through e or some other way?
Here,
eis an event object, as defined here: http://api.jquery.com/category/events/event-object/Yes you can pass data to the handler, using this form for the click function:
It will be accessible as
e.datain the handler.