Alert which checkbox[x] of array was clicked?
<p>My code onclick for each checkbox function is:</p>

<pre><code>function testc() {
   var values1 = new Array();
   jQuery.each(jQuery("input.id1"), function() {
     values1.push(jQuery(this).attr("name"));
   });
   var values2 = new Array();
   jQuery.each(jQuery("input.id76"), function() {
     values2.push(jQuery(this).attr("name")); 
   });
   //build arrays

   var attname = "[name='"+values1[this]+"']"; //there should also be indexof clicked checkbox

   jQuery("input:[type=checkbox]"+attname+"").attr("checked", true);

   alert(values1.findIndex(jQuery(this).attr("name")));
}
</code></pre>

<p>What's wrong? :/ I think the problem is how I'm getting indexes.</p>
