.hover problem with hoverout

.hover problem with hoverout

Hi,

the hoverout does not work because of the index. I need a unique class on every item so the index works fine with addClass, but removeClass does not remove the class. I don't know why.

  1.         $(function() {
  2.             var $items = $('#myItem');
  3.             $items.hover(function(){
  4.                         var index = $items.index($(this));
  5.                         $(this).addClass('hov'+ index);},function(){$(this).removeClass('hov' + index);});
  6. });

Is there any other solution?
jbobbele