I currently have a php generated array that looks like:

<ul><div class="oddListing"><li><a
<div class="evenListing"><li><a
<div class="oddListing">


This array can exceed a thousand records at any one time. I'm trying to
conform this to HTML 4.01 Transitional which means moving the onClick and onDblClick to a series of addEvent statements in the head section of the document.

I'd like to avoid declaring a thousand functions like:

$('someID1').addEvent('click', function() { Somefunction(); });
$('someID1').addEvent('dblclick', function() { SomeDblfunction(); });
$('someID2').addEvent('click', function() { Somefunction(); });


Is there some method for coding this using class rather than id? A single function that will be able to recognize the id rather than a thousand identical functions with slightly different arguments.

I believe JQuery can take a class as a parameter something like $('.classname') rather than $('#id')