Dan Eastwell schrieb: > How can I change this: > > <h2>text</h2> > <h2>other text</h2> > > to this: > > <h2><a href="#">text</a></h2> > <h3><a href="#">other text</a></h3> > > Thanks, > > Dan.
Try (untested): $('h2+h2').each(function() { var $$ = $(this); $$.before('<h3><a href="#">' + $$.text() + '</a></h3>').remove(); }); -- Klaus _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/