update the method  offset()

getting the element's attribute(such as: height) which has the style "display:none".