This sort of goes against the grain of what jQuery is about -- UJS (unobtrusive javascript). I think what you're normally do (or at least, what I'd do; I'm not a huge buff on passing validation) is add a record_id property to the input, then have like
<input type='button' value='Button' onclick='Record.show()' id="my_show_button" /> $("input.my_show_button").click(function(){ $("#record_"+$(this).attr ("record_id")).show() }); or something. Or you could encode the record id in the name or id of the input (like after a _ or something, my_show_button_4). I may be wrong, but I think Prototype is more about creating object classes (like Record), but jQuery certainly isn't. Thoughts? Max On Dec 4, 2:31 pm, Will <[EMAIL PROTECTED]> wrote: > Does anyone know of a way to use class like objects in event handling > using jQuery? > > For Example, > > <input type='button' value='Button' onclick='Record.show()' /> > > where .show() is a method of the Record object. This would be really > cool to be able to reuse the method name .show() but with different > objects verses just coding a huge list of functions that are hard to > organize and end up with long names. > > Thanks