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
, 2009 at 7:20 AM, aly he...@digitalnature.ro wrote:
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 19 Mai, 19:44, Richard D. Worth rdwo...@gmail.com wrote:
On Tue, May 19, 2009 at 10:48 AM, aly he...@digitalnature.ro wrote:
thanks for your reply.
html is something like:
div class=mydivcontainer
...
div class=mydiv
...
/div
/div
there are more elements where I
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 rdwo...@gmail.com wrote:
How about (untested):
$(this).parent().prepend(this)
?
- Richard
On Tue, May 19, 2009 at 1:29 PM, aly he
found it:
jQuery(this).prependTo(this.parentNode) works!
thanks
On 19 Mai, 20:43, Richard D. Worth rdwo...@gmail.com wrote:
How about (untested):
$(this).parent().prepend(this)
?
- Richard
On Tue, May 19, 2009 at 1:29 PM, aly he...@digitalnature.ro wrote:
it seems that parent
5 matches
Mail list logo