Bug Tracker

Modify

Ticket #6441 (closed bug: worksforme)

Opened 3 years ago

Last modified 14 months ago

$(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:
Blocking: Blocked by:

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

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

Change History

comment:1 Changed 3 years ago by sayan.chaliha

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

Changed 3 years ago by dmethvin

Test case for #6441

comment:2 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to worksforme

Seems to work for me in IE8, see attached.

comment:3 Changed 2 years ago by hello@…

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.