Bug Tracker

Ticket #2537 (closed bug: fixed)

Opened 6 months ago

Last modified 4 months ago

attr() can return undefined instead of 0

Reported by: haijun-zeng Assigned to: anonymous
Type: bug Priority: major
Milestone: 1.2.4 Component: core
Version: 1.2.3 Keywords: offsetLeft
Cc: Needs: Review

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

Change History

Changed 6 months ago by flesler

This should fix that.

Changed 6 months ago by davidserduke

  • summary changed from a bug on jQuery 1.2.3 to attr() can return undefined instead of 0

Changed 4 months ago by flesler

  • status changed from new to closed
  • resolution set to fixed

Fixed at [5574], check #2548.

Note: See TracTickets for help on using tickets.