Hi, I did, in fact, want to wrap the child elements.  These I then
manipulate for positioning.  The error I made was a rookie mistake, using
"span" rather than "<span></span>".  In the absence of an element tag in the
wrap, jQuery then proceeds to analyse the existing tags, finding the deepest
element, it duplicated it and used it to wrap the elements.
Thanks,

Julian

2008/11/7 Karl Swedberg <[EMAIL PROTECTED]>

> hi Julian,
> You're asking jQuery to wrap each child element in a span. I'm guessing you
> might rather want to wrap a single span around all of those child elements,
> in which case you would use .wrapAll()
>
>
> --Karl
>
> ____________
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
>
>
>
>
> On Nov 7, 2008, at 10:48 AM, Julian Birch wrote:
>
>
> Could someone explain to me why the following page shows four text boxes?
>  Seems like it should be a relatively inoffensive operation.
>
> Thanks in advance,
>
> Julian.
>
>
> <html>
>
> <head>
>
>     <script type="text/javascript" src="/jquery-1.2.6.js"></script>
>
>     <script type="text/javascript">
>
> $(document).ready(function() {
>
>     elements = $("div > *"); elements.wrap("span");
>
> });
>
>     </script>
>
> </head>
>
> <body>
>
>     <form>
>
>     <div class='Box'>
>
>
>             <label for='repeat'>Repeat</label>
>
>             <span>
>
>                 <input id='repeat' type='text' value='Box1' />
>
>             </span>
>
>     </div>
>
>     </form>
>
> </body>
>
> </html>
>
>
>
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to