Skip to main content

Bug Tracker

Side navigation

#10861 closed bug (worksforme)

Opened November 22, 2011 06:23PM UTC

Closed November 22, 2011 06:31PM UTC

Last modified November 22, 2011 07:17PM UTC

prepend error in IE9

Reported by: AndyKirk Owned by:
Priority: low Milestone: None
Component: manipulation Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:
Description

Hi,

I couldn't find a ticket describing this problem, so sorry if it's a duplicate.

IE9 (win7) seems to throw an error:

SCRIPT65535: Invalid calling object

jquery-1.7.js, line 6002 character 5

When running trying to append newly created elements assigned to a variable:

<ul id="test">

<li>An item</li>

</ul>

$(function() {

item = $('<li>Should be first</li>');

$('#test').prepend(item);

});

http://jsfiddle.net/AndyKirk/dGSFe/3/

Attachments (0)
Change History (3)

Changed November 22, 2011 06:24PM UTC by anonymous comment:1

Oh, sorry, tested in FF8 & Chrome 15 and it works fine.

Thanks.

Changed November 22, 2011 06:31PM UTC by timmywil comment:2

component: unfiledmanipulation
priority: undecidedlow
resolution: → worksforme
status: newclosed

http://jsfiddle.net/timmywil/dGSFe/4/

I'm not sure the issue there, but if item is not declared globally, everything works as expected.

Changed November 22, 2011 07:17PM UTC by dmethvin comment:3

There appears to be a global window.item variable in IE9 that is native code.

http://jsfiddle.net/dmethvin/Dg7mf/