I am trying to hide an input box if the preceding input box's value is the same e.g.

```
City     Id    Name

NY        1     James
NY        2     John
TOKYO     3     Jane
TOKYO     4     June

```

I want to hide the second NY and the second TOKYO (NB:only the city, the Id and Name should remain).

I am using the jQuery script below: 

```
<script>

$(function(){

var tr_no = $('.city').length;

for(i=1; i<=tr_no; i++)  {

    if($(".city:eq("+i+")").val() == $(".city:eq("+i+++")").val()){

        $(".city:eq("+i+1+")").css({'display':'none'});

        }

    }

});

</script>

```

It is not working. Firebug Console does not return any errors. Any help on how to continue this on jQuery will much appreciated.