I think this is more a misunderstanding of how jQuery works.

$('#id').attr('innerHTML', 'something'); is the same thing as doing:

<div id="id" innerHTML="something"/>

Clearly that's incorrect.  innerHTML is abstracted with the html() method in
jQuery, which is preferred way of doing it.  See:

http://docs.jquery.com/Attributes/html#val

If your getting an error for some reason, provide a testcase that actually
demonstrates the error.  My guess is your trying to do it on an xml document
(or xhtml with a content type of application/xhtml+xml).

-R

On Sun, Oct 12, 2008 at 9:31 PM, spicyj <[EMAIL PROTECTED]> wrote:

>
> Use $("#id").html(...)
>
> ~Ben
>
> On Oct 12, 10:39 am, Sina Salek <[EMAIL PROTECTED]> wrote:
> > Hi everyone,
> > When i use innerHtml, either with $('#id').attr('innerHTML'... or
> > getElementById('id').innerHTML , jquery can no longer
> > find the elements imported via innerHTML.
> > First i search the web, but couldn't any thing related to this issue.
> > The first things came into my mind was, jquery needs to traverse new
> > elements again.
> > I checked the source code and found this f.apply( document ); and
> > tried using it in serveral ways
> > but couldn't get it to work.
> >
> > I'm totaly out of idea(s) :( and really apperciate any help. tx
> >
> > I'm using 1.2.6
>
> >
>

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