Answer the question
In order to leave comments, you need to log in
Why is offset().top throwing an error?
Hello! There is this code:
var elem = jQuery('.table-price-wrapper tr').eq(find);
var ypos = jQuery(elem).offset().top;
jQuery('.table-price-wrapper tr').removeClass('active');
jQuery('.table-price-wrapper').animate({scrollTop: jQuery('.table-price-wrapper').scrollTop() - 20 + ypos + 'px'}, 700);
jQuery('.table-price-wrapper tr:eq(' + find + ')').addClass('active');
Answer the question
In order to leave comments, you need to log in
Butter oil...
//eq возвращает jQuery-объект, а не обычный элемент
//И получается у вас такое действо:
$($(something)).offset().top;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question