Just to clarify, the correct way would be:

$("#test").after("<input type='button' id='test' value='submit'>");

OR

$("<input type='button' id='test' value='submit'>").insertAfter("#test");

both of which say "create an <input> (with the attributes set as shown) and
insert it after #test in the DOM"

On 5/10/07, Erik Beeson <[EMAIL PROTECTED]> wrote:


Right.

$("#test").insertAfter("<input type='button' id='test' value='submit'>");

Is the same as:

$("<input type='button' id='test' value='submit'>").after("#test");

Which is "insert #test after a newly created but not in the DOM input
node", which doesn't do anything unless you go on to add it the DOM
somehow.

--Erik

On 5/10/07, Glen Lipka <[EMAIL PROTECTED]> wrote:
> This is sort of strange.
>
> $("#test").after("<input type='button' id='test' value='submit'>");
> $("#test").remove();
> Works in IE
>
> $("#test").insertAfter("<input type='button' id='test'
value='submit'>");
> $("#test").remove();
> This doesn't.
>
> In the API it says, "Same as $("#foo").after("p")"
>
> Im confused.
>
> Glen
>
>
>
> On 5/10/07, Glen Lipka < [EMAIL PROTECTED]> wrote:
> > What about finding the elements, and removing them, and inserting new
> inputs with the right type?
> >
> > $("#btnEnviar").insertAfter("<input type='button'
> id='btnEnviar'>");
> >
> > $("#btnEnviar").remove();
> >
> >
> > Its only slightly longer, but would work in IE.
> >
> > Glen
> >
> >
> >
> > On 5/10/07, Harlley Roberto < [EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > I need to do this:
> > > $("#btnEnviar").attr("type", "button");
> > >
> > > But accordind to my googled, I think that it's not possible on IE
> > >
> > > http://dev.jquery.com/ticket/120
> > >
> > > How can I do to solve my problem ?
> > >
> > > Regards,
> > >
> > > Harlley
> > >
> > > --
> > > www.syssolution.com.br
> > > ------------------------------------------------------
> > > Desenvolvimento de sistemas e sites
> > > ------------------------------------------------------
> > > [EMAIL PROTECTED]
> >
> >
>
>




--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com

Reply via email to