Skip to main content

Bug Tracker

Side navigation

#6441 closed bug (worksforme)

Opened April 15, 2010 10:01AM UTC

Closed April 16, 2010 12:46AM UTC

Last modified March 15, 2012 07:26PM UTC

$(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

offset['top'] += $('#div1').outerHeight();

offset['left'] += $('#div1').outerWidth();

$('#div2').offset(offset); fails

Attachments (1)
Change History (3)

Changed April 15, 2010 10:03AM UTC by sayan.chaliha comment:1

offsettop? => offset.top

offsetleft? => offset.left

Changed April 16, 2010 12:46AM UTC by dmethvin comment:2

resolution: → worksforme
status: newclosed

Seems to work for me in IE8, see attached.

Changed January 26, 2011 02:22PM UTC by hello@ianlunn.co.uk comment:3

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