I have been trying to use jquery click event with an element in php for loop. How can I transfer the counter value to jquery before click.
My PHP Code:
<?php $counter=0;foreach($a as $abc){$counter++;?>
<div id="mail_<?php echo $counter;?>" class="ma" />
<?php }?>
Jquery Code:
$(document).ready(function(){
$(".ma").click
How could I use this counter variable before click in jquery.