Fixed issue with offsetheight not always returning a value

Changed .attr('offsetheight') to .height() due to offsetHeight not always working and sometimes coming back as either 0 or undefined. height() always returns the correct value