Avoid setting elem.style.top = "NaNpx"

For compatibility with older versions of jQuery and older browsers,
avoid setting elem.style.top = "NaNpx", to fix #169