[jQuery] Re: wrap() issue

2007-12-13 Thread pixeline
thanks a lot Karl Eyes-of-the-Hawk it made the trick! ;-) in the meanwhile i had a successful try at it but it's nasty compared to your prop: $('#dsViewport h3').each(function(index){ var $this = $(this); var $text= $this.text();

[jQuery] Re: wrap() issue

2007-12-13 Thread Karl Swedberg
Hi Alexandre, I think an element needs to be inserted in the DOM before it can be wrapped. Try it this way: $('').appendTo('#header'); $('#dsViewport h3').each(function(index){ var $this = $(this); $('') .attr({