Hi,

I have a unordered list that looks like this...
HTML Code:
<ul id="list">
   <li id="item-1">
      <h2>News Header 1</h2>
      <p>Some interesting information about some part of this (or another) website.</p>
   </li>
   <li id="item-2">
      <h2>News Header 2</h2>
      <p>Some interesting information about some part of this (or another) website.</p>
   </li>
   <li id="item-3">
      <h2>News Header 3</h2>
      <p>Some interesting information about some part of this (or another) website.</p>
   </li>
   <li id="item-4">
      <h2>News Header 4</h2>
      <p>Some interesting information about some part of this (or another) website.</p>
   </li>
   <li id="item-5">
      <h2>News Header 5</h2>
      <p>Some interesting information about some part of this (or another) website.</p>
   </li>
   <li id="item-6">
      <h2>News Header 6</h2>
      <p>Some interesting information about some part of this (or another) website.</p>
   </li>
   <li id="item-7">
      <h2>News Header 7</h2>
      <p>Some interesting information about some part of this (or another) website.</p>
   </li>
   <li id="item-8">
      <h2>News Header 8</h2>
      <p>Some interesting information about some part of this (or another) website.</p>
   </li>
   <li id="item-9">
      <h2>News Header 9</h2>
      <p>Some interesting information about some part of this (or another) website.</p>
   </li>
</ul>
Its formatted to look like this:


These can be sorted on the fly with Ajax, however I also want to use a mechanism for turning on/off any one of the 'rows'. See below:


I intend to do this using Ajax aswell, I want to get the ids of the 1-3 li's, 4-6 li's and 7-9 li's, and then pass them to the database and set the active field to on/off . My problem is that I cant figure out how to actually get the ids of the list items in each 'row' because it changes whenever the user changes the sort order of the list items.

Can anyone help? Feel free to ask questions.
Thanks.