Setting the innerHTML of an element regenerates all the HTML nodes  
within. If you have any JavaScript references to those nodes or any  
custom events on nodes within they will no longer resolve or fire.

 From JavaScripts perspective, they are all new objects. I think John  
is saving people from that behavior.

Gabriel Harrison


Sent from my iPhone

On Oct 9, 2009, at 9:39 AM, David Lee <davidomu...@gmail.com> wrote:

>
> Hey Dave,
>
> Thanks for the response!
>
> I guess my bottom-line point is that html(newHTML) should behave like
> innerHTML = newHTML, but that it doesn't. It doesn't matter what the
> browser should do, but what in fact it does do. In my scenario, I'm
> using HTML5 elements that work if they have been created once in the
> document using createElement(). Setting innerHTML works with my
> particular fragment of HTML5; html() does not.
>
> Could you also answer why html(newHTML) isn't just defined to be
> innerHTML = newHTML? John mentioned that the javascript would be re-
> executed if you do that, but I can't imagine why that would happen.
> >

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to