Question: I have a div that has multiple children divs. inside of the children divs consist of a table. In that table are two span tables that i need edited using jquery. maybe a each selector or something.

```
      <div class="slides">
    <div class="Slide1><table><tr><td><span class="span1"></span><span id="span2"></span></td></tr></table></div>
    <div class="Slide2><table><tr><td><span class="span1"></span><span id="span2"></span></td></tr></table></div>
</div>

```

Each div I want to go in and edit span1 and span2. span 1 with the iteration number and span2 with the size of slides total. Thank you for any help.

Answer: 
well first of all your ids and classes are set up wrong. you can't have two of the same Id:

```
<div class="Slide1><table><tr><td><span class="span1"></span><span id="span1"></span></td></tr></table></div>
    <div class="Slide2><table><tr><td><span class="span2"></span><span id="span2"></span></td></tr></table></div>

```

so to select and put text in each one you would use:

```
$('#span1').text("whatever you want in there");
$('.span1').text("whatever you want in there");
$('#span2').text("whatever you want in there");
$('.span2').text("whatever you want in there");

```
```
function SetupNumberPictureCounter() {
    $('.span1').each(function (index) {
        $(this).html(++index);
    });
    $('.span2').html($('div.Slide_Item').size());
}

```