thanxs a lot for the quick answer...

I see in HTML4.01 it was <input>
and in strict mode <input />
but never <input></input>

El 21/01/2009 16:42, John Resig escribió:
> Well, considering that $('<input type="text"></input">') is invalid
> HTML (and $(...) only accepts valid HTML input) I think it's safe to
> say that any output provided is not guaranteed to be correct.
>
> --John
>
>
>
> On Wed, Jan 21, 2009 at 10:38 AM, Enrique Meléndez Estrada
> <[email protected]> wrote:
>   
>> 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
>>
>>
>>     
>
> >
>
>   


-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to