Skip to main content

Bug Tracker

Side navigation

#2537 closed bug (fixed)

Opened March 18, 2008 03:03AM UTC

Closed May 13, 2008 12:38AM UTC

attr() can return undefined instead of 0

Reported by: haijun-zeng Owned by:
Priority: major Milestone: 1.2.4
Component: core Version: 1.2.3
Keywords: offsetLeft Cc:
Blocked by: Blocking:
Description

I use $(this).attr("offsetLeft") to get the offsetLeft of a DIV, when the offsetLeft is 0, it will return 'undefined'. when the offsetLeft is large then 0, it will return the correct number.So, I need to use this.offsetLeft instead of $(this).attr("offsetLeft");

Attachments (0)
Change History (3)

Changed March 18, 2008 11:38PM UTC by flesler comment:1

This should fix that.

Changed March 21, 2008 03:20PM UTC by davidserduke comment:2

summary: a bug on jQuery 1.2.3attr() can return undefined instead of 0

Changed May 13, 2008 12:38AM UTC by flesler comment:3

resolution: → fixed
status: newclosed

Fixed at [5574], check #2548.