Как вычислить все элементы кроме того на котором наведен курсор?

Есть карточки с классом bc_card. При наведении на карточку нужно вычислить высоту всех карточек кроме той на которой курсор. Вот так не получается.

   $('.bc_card').on('mouseover', function() {
        innerWrappHeightArr = [];
        $(".bc_card").each(function() {
        if( !$(this).not() ) { // наверное это условие не правильное
          innerWrapp = $(this).find(".inner_content");
          innerWrappHeight = $(this).height();
          innerWrappHeightArr.push(innerWrappHeight);
        }
       });
       maxHeight = Math.max.apply(null, innerWrappHeightArr);
       $(".bc_card").css({
         "height" : maxHeight + "px"
       });
    });

Как это сделать?


Ответы (1 шт):

Автор решения: Denis

Сделал во так

$('.bc_card').on('mouseover', function() {
  innerWrappHeightArr = [];
  thisElem = $(this);
  $(".bc_card").each(function() {
    if( $(this) != thisElem ) {
      innerWrapp = $(this).find(".inner_content");
      innerWrappHeight = $(this).height();
      innerWrappHeightArr.push(innerWrappHeight);
    }
  });
  maxHeight = Math.max.apply(null, innerWrappHeightArr);
  $(".bc_card").css({
   "height" : maxHeight + "px"
  });
});
→ Ссылка