I think you want insertAfter(e), instead of after(e). Your after(e) call is
trying to move 'e' to be after its clone, which is disconnected from the
DOM, floating if you will. That's why you're getting 'this.parentNode has no
properties'

- Richard

On Dec 15, 2007 7:34 PM, Antonio Jozzolino <[EMAIL PROTECTED]>
wrote:

>
> Thanks, David, but it don't work too:
>
> this.parentNode has no properties
> e(div.add-more)jquery-1.2.1.pack... (line 11)
> e()jquery-1.2.1.pack... (line 11)
> e([div.add-more], function(), undefined)jquery-1.2.1.pack... (line 11)
> e()jquery-1.2.1.pack... (line 11)
> e([div.add-more], function(), undefined)jquery-1.2.1.pack... (line 11)
> e(function(), undefined)jquery-1.2.1.pack... (line 11)
> e([[div.add-more]], false, -1, function())jquery-1.2.1.pack... (line
> 11)
> e()jquery-1.2.1.pack... (line 11)
> (no name)()cotacao_on_line.a... (line 65)
> e(Object type=click target=span.bt-more)jquery-1.2.1.pack... (line 11)
> e()jquery-1.2.1.pack... (line 11)
> [Break on this error] eval(function(p,a,c,k,e,r){e=function(c)
> {return(c<a?'':e(parseInt(c/a)))+((c=c%a...
>
> JS:
>
>        $('span.bt-more').bind('click', function(){
>                var e = $(this).parent();
>                e.clone().after(e);
>        });
>
> html
>
>        <div class="add-more">
>                <label for="empresas_coligadas_ou_filiais" class="label-
> ecf">Empresas Coligadas ou Filiais</label>
>                <input name="empresas_coligadas_ou_filiais" type="text"
> maxlength="255" />
>                <span class="bt-more"></span>
>            <span class="bt-less"></span>
>        </div>
>
> On Dec 15, 5:01 pm, David Serduke <[EMAIL PROTECTED]> wrote:
> > At least one error is here:
> >
> > var e = $(this).parent()[0];
> >
> > should be just
> >
> > var e = $(this).parent();
> >
> > You were converting the jQuery object to a DOM object then trying to
> > run jQuery methods on it.
> >
> > David
> >
> > On Dec 15, 2:04 am, Antonio Jozzolino <[EMAIL PROTECTED]>
> > wrote:>         <div class="add-more">
> > >                 <label for="empresas_coligadas_ou_filiais"
> class="label-
> > > ecf">Empresas Coligadas ou Filiais</label>
> > >                 <input name="empresas_coligadas_ou_filiais"
> type="text"
> > > maxlength="255" />
> > >                 <span class="bt-more"></span>
> > >             <span class="bt-less"></span>
> > >         </div>
> >
> > >         $('span.bt-more').bind('click', function(){
> > >             var e = $(this).parent()[0];
> > >                 e.parent().clone().after(e);
> > >         });
> >
> > > Where is the error?
> >
> > > Thanks.
> >
> > > Antonio
>

Reply via email to