So I have been stuck on this for some time now, and cant seem to get the right syntax.

I have a While loop which goes through several elements successfully until it reaches some forms.

I'm attempting to make each form with in the while loop to have a different(unique) class id, at the moment i'm just using a simple count which is attached to the onclick and also class.

The onclick then runs the JS, I'm just struggling to add the unique count to the class in the JS, hopefully my code will explain more.

**JS**

```
function hidelike(t) {
if ($(".like").is(':visible')) {

    $(".like").hide();
    $(".unlike").show();
    $(".dislike").hide();

} else {
   $(".like").show();
   $(".unlike").hide();
   $(".dislike").show();
}
}

```

**HTML**

```
<form class="likesubmit<?php echo $like_count;?>">
<input type="button" class="like<?php echo $like_count;?>" value="Like"  onclick="hidelike(<?php echo $like_count;?>)">   
</form>

```

I have defined the count already so that's not the problem I have also alerted the count in the JS and that works fine.

Hope I explained my problem okay, thanks in advance James.