> -------Original Message------- > From: Blair Mitchelmore <[EMAIL PROTECTED]> > Subject: Re: [jQuery] Sortables question > Sent: Feb 20 '07 18:29 > > $('ol.steps li').each(function(index) { > $(this).append('<span class="aside">List item ' + (index + 1) + > '</span>'); > }); > > Would convert: > > <ol class="steps"> > <li>Cut a hole in a box</li> > <li>Put your junk in that box</li> > <li>Make her open the box</li> > </ol> > > into: > > <ol class="steps"> > <li>Cut a hole in a box<span class="aside">List item 1</span></li> > <li>Put your junk in that box<span class="aside">List item 2</span></li> > <li>Make her open the box<span class="aside">List item 3</span></li> > </ol> > > ...I think... > > If each li element has an id attribute you can access them by using > this.id inside the each iterator function. > > -blair > > [EMAIL PROTECTED] wrote: > > Regarding the sortables plug-in and the specific example > > > > http://interface.eyecon.ro/demos/sort_lists.html > > > > does anyone know how I would iterate over the items in the list in the > order in which they appear on screen? My goal is to list the ids in the > order they appear. > > > > Your help is greatly appreciated as always, - Dave > > > > _______________________________________________ > > jQuery mailing list > > discuss@jquery.com > > http://jquery.com/discuss/ > >
Beautiful! Thanks, - Dave _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/