On 2006.09.12, Stamen Georgiev <[EMAIL PROTECTED]> wrote: > Forgive me my stupid question... but is there an easy way to turn this: > > <a href="#">some text</a> > > into this: > > <a href="#"><div class='someclass'>some text</div></a> > > It's some kind of wrap... but from the inside :-)
I'm assuming you want to inject the div for a reason OTHER than to add the class? If not, why not just $("[EMAIL PROTECTED]'#']").addClass("someclass") ... right? To do what you're looking for, my first attempt would be: var elem = $("[EMAIL PROTECTED]'#']"); elem.html('<div class="someclass">' + elem.html() + '</div>'); -- Dossy -- Dossy Shiobara | [EMAIL PROTECTED] | http://dossy.org/ Panoptic Computer Network | http://panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70) _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/