Actually, if the same form is used more than once on a page, you can almost guarantee that it will *not* have the same name. Take a look at the comments in "form_clean_id()" concerning its effects on jQuery. I think adding a class might make this more difficult, unless that code is fully aware of multiple instances of a form on a page.
Nancy E. Wichmann, PMP
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: Steven Jones
However, you cannot therefore guarantee that the form element will
always have the same ID.
Usually I'd add a class to the item I want to add the behaviour to (in
form alter or theme function), and then attach the javascript using
the Drupal.behaviors technique.
Regards
Steven Jones