Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#6441 closed bug (worksforme)

$(selector).offset(offset_obj) does not work in IE8

Reported by: sayan.chaliha Owned by:
Priority: Milestone: 1.4.3
Component: offset Version: 1.4.2
Keywords: .offset() IE8 error Cc:
Blocked by: Blocking:

Description

Version: jQuery 1.4.2 (jquery-1.4.2.min.js)

Problem: Internet Explorer 8 throws an unspecified error when using $(selector).offset(offset_obj)

File: jquery-1.4.2.min.js Line number: 145 Error Code: 0

How to reproduce: Simply try to set the offset of a div element. For example:

var offset = $('#div1').offset(); works offsettop? += $('#div1').outerHeight(); offsetleft? += $('#div1').outerWidth(); $('#div2').offset(offset); fails

Attachments (1)

test-6441.html (478 bytes) - added by dmethvin 10 years ago.
Test case for #6441

Download all attachments as: .zip

Change History (4)

comment:1 Changed 10 years ago by sayan.chaliha

offsettop? => offset.top offsetleft? => offset.left

Changed 10 years ago by dmethvin

Attachment: test-6441.html added

Test case for #6441

comment:2 Changed 10 years ago by dmethvin

Resolution: worksforme
Status: newclosed

Seems to work for me in IE8, see attached.

comment:3 Changed 9 years ago by hello@…

Experienced this too. You must use both offset arguments "left" and "top" else IE8 throws an unspecified error.

Note: See TracTickets for help on using tickets.