Dossy Shiobara schrieb:
> 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
>
Never inject a div into an anchor. Might save you some trouble...
-- klaus
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/