I've got a table that is produced through 2 loops (using coldfusion). I need to be able to place the classes within an array, that way I can calculate the columns and rows. Here is the link: http://mercury.hamilton.edu/devmpstone/forms-pdf/employee-expense-report.cfm
The JavaScript looks like: $('.calc').change(function(){ var classArray = new Array("'"+$(this).attr("class").replace(/ / g,"','")+"'"); alert(classArray.length); $.each(classArray, function(){ //alert(this); }); }); Loops creating the table, with the inputs and classes. <cfloop from="1" to="#ArrayLen(labels)#" index="r"> <tr> <td class="labels"><cfif ArrayIsDefined(labels,r) AND labels[r] NEQ "Open">#labels[r]#</cfif></td> <cfloop from="1" to="7" index="i"> <td id="Day#i#" class="row#r# col#i#"> <cfif r EQ 1>#Left(DayOfWeekAsString(i),3)#<cfelse><cfif r EQ 2><input type="text" class="date-mask" /><cfelse><input type="text" class="calc R#r# C#i#" /></cfif></cfif></td> </cfloop> <td class="totals"><cfif r EQ 1>Total<cfelse><input type="text" class="ttl#r# vttl#i#" readonly="readonly" /></cfif></td> </tr> </cfloop>