Hi,
I don't know if this is an expected behavior or not, or it has been
reported earlier.
In jQuery versions 1.2.6 and 1.3, if you create a new HTML tag such as:
$('<input type="text"></input">'), it creates 2 jquery objects in IE
(one for INPUT, other for /INPUT), while it is 1 for the other browsers.
$('<input type="text" />').length), it creates 1 correct jquery object
for all browsers (only one INPUT).
You can check this in IE with:
alert($('<input type="text"></input">').length)
or
alert($('<input type="text"></input">')[1].nodeName)
so we must be very careful in writing the html of a node to be created...
I discovered this doing something like..
$('<input type="text"></input">')
.appendTo('#mydiv')
.each(function(){
// whatever I write here was executed twice in IE7 ????
// while, as expected, other browsers executed once (there is
only one INPUT to be created)
})
--
Enrique Meléndez Estrada (2367)
Servicios Informáticos
Organización y Servicios Internos
Instituto Tecnológico de Aragón
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---