Question: i have in a table of my database 100 records of locations, and i need for example divide in 4 columns with ul list where each ul/columns have 25 records, but im not quite getting it working, here is my code:

```
$sql = "SELECT * FROM districts";
$consulta = mysql_query($sql);
$beginTag = '
    <div class="four columns">
        <h4>&nbsp;</h4>
        <ul class="footer-links">';

$endTag = '</ul></div>';
$html = '';

$counter = 4;
if ($counter >= 4) {
    echo $beginTag;
}

while ($mostrar = mysql_fetch_array($consulta)) {
    $counter++;
    $town = $mostrar['name_en'];                

    echo '<li><a href="#"><strong>'.$town.'</strong> Jobs</a></li>';            

    $counter = 0;

}

if ($counter >= 4) {
    echo $endTag;
}

```

Answer: 
There is no attribute called `paragraph_id` in your button tags, so your `$(this).attr('paragraph_id')` returns `undefined`. Since `paragraph_id` is not a standard HTML attribute, I advise against simply adding it. Instead just add to each button a data-attribute like so: 

```
<button class="learn-more" data-paragraph-id="#p1">Learn More</button>

```

and in your handler use `$(this).data('paragraph-id')` to identify the paragraph to be shown.

Notice that the hash sign is included so you don't have to use the string concatenation anymore. Simply call:

```
$($(this).data('paragraph-id')).show();

```
```
$(document).ready(function () {
 $('elem').click(function(){
  var getIndex = $('elem').index(this);
  $('elem2').hide();
  $('elem2:eq"' + getIndex + '"').show();
 });
});

```

Should work, hope it is exactly what you want :)