found it:
jQuery(this).prependTo(this.parentNode) works!
thanks
On 19 Mai, 20:43, "Richard D. Worth" wrote:
> How about (untested):
>
> $(this).parent().prepend(this)
>
> ?
>
> - Richard
>
>
>
> On Tue, May 19, 2009 at 1:29 PM, aly wrote:
>
doesnt work. I get:
Error: [Exception... "Node cannot be inserted at the specified point
in the hierarchy" code: "3" .
On 19 Mai, 20:43, "Richard D. Worth" wrote:
> How about (untested):
>
> $(this).parent().prepend(this)
>
> ?
>
> - R
e and dynamic
items with that class...
On 19 Mai, 19:44, "Richard D. Worth" wrote:
> On Tue, May 19, 2009 at 10:48 AM, aly wrote:
>
> > thanks for your reply.
> > html is something like:
>
> >
> > ...
> >
> > ...
> >
> >
t. I haven't tested, but this is my best guess just
> looking at your code, and without seeing your html.
>
> - Richard
>
> On Tue, May 19, 2009 at 8:27 AM, Richard D. Worth wrote:
>
>
>
> > What does your html look like? Is .mydivcontainer the immediate parent of
&
I'm trying to move a set of divs into their parent elements.
Currently I'm using:
jQuery('.mydiv').each(function(){ jQuery(this).prependTo
('.mydivcontainer').remove(); });
this works somehow, but the problem is that all elements on the page
with class .mydiv are inserted into each .mydivconta
5 matches
Mail list logo