ohneworte
2008-Jan-09 21:09 UTC
(How) Can I use "Element.wrap" to wrap around more than one element?
Good evening, I tried to find a possibility to use "Element.wrap" to wrap a "<div>"- Tag around more than just a single element? E.g. I have this ...: <span id="one">One</span> <span id="two">Two</span> ... and want to have this: <div> <span id="one">One</span> <span id="two">Two</span> </div> As far as I can see, "Element.wrap" wraps only around ONE element. Any ideas for a solution? Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
ityndall-ue636x8T32g@public.gmane.org
2008-Jan-09 21:39 UTC
Re: (How) Can I use "Element.wrap" to wrap around more than one element?
How about:
http://pastie.caboo.se/137405
With that functionality, you could just do:
$$(''span'').wrap();
On Jan 9, 4:09 pm, ohneworte
<alexander.gewess...-Tswl7xcH0yE@public.gmane.org>
wrote:> Good evening,
>
> I tried to find a possibility to use "Element.wrap" to wrap a
"<div>"-
> Tag around more than just a single element?
>
> E.g. I have this ...:
> <span id="one">One</span>
> <span id="two">Two</span>
>
> ... and want to have this:
> <div>
> <span id="one">One</span>
> <span id="two">Two</span>
> </div>
>
> As far as I can see, "Element.wrap" wraps only around ONE
element. Any
> ideas for a solution?
>
> Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
Andrew Dupont
2008-Jan-10 03:18 UTC
Re: (How) Can I use "Element.wrap" to wrap around more than one element?
I see you and raise you! ;-) http://pastie.caboo.se/137552 Cheers, Andrew On Jan 9, 3:39 pm, itynd...-ue636x8T32g@public.gmane.org wrote:> How about: > > http://pastie.caboo.se/137405 > > With that functionality, you could just do: > > $$(''span'').wrap(); > > On Jan 9, 4:09 pm, ohneworte <alexander.gewess...-Tswl7xcH0yE@public.gmane.org> wrote: > > > Good evening, > > > I tried to find a possibility to use "Element.wrap" to wrap a "<div>"- > > Tag around more than just a single element? > > > E.g. I have this ...: > > <span id="one">One</span> > > <span id="two">Two</span> > > > ... and want to have this: > > <div> > > <span id="one">One</span> > > <span id="two">Two</span> > > </div> > > > As far as I can see, "Element.wrap" wraps only around ONE element. Any > > ideas for a solution? > > > Thanks!--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
ohneworte
2008-Jan-13 20:15 UTC
Re: (How) Can I use "Element.wrap" to wrap around more than one element?
Thank you for the useful links! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---