I face a situation where google chrome returns
Uncaught TypeError: Cannot read property 'top' of undefined
This is my jquery code
$(document).on('click', '.show_popup', function(){ document.body.style.overflow = "hidden"; $('body').css('overflow', 'hidden'); callAjax($(this).attr('href'), 'mode=ajax', function(t){ $('.popup-screen').html(t); $('.main-overlay').show(); // $('').raty(); $('#star').raty({ click: function(score, evt) { $('#review_rating').val( score); } }); // window.scroll(0,0); $("html, body").animate({ scrollTop: $(".screenTable").offset().top },500); }); return false; }); Please help and also after error at
XMLHttpRequest.self.xmlHttpReq.onreadystatechange
.screenTableelement(s)? Can you ensure that at least one matching element exists on your HTML when this code is run?$(".screenTable").offset()is