This is my jQuery code:

```
$('.projektet').click(function(){
    var url = $(this).find("a").attr("href");
    window.location = url;
});

```

```html
<div class='projektet'>
    <h3>".$alias." ".$expertis." ".$other."</h3>
    <h3>".$headline."</h3>
    <p>".$desc."</p>
    <a href='posts.php?id=".$id."'></a>
</div>

```

CSS: 

```
.projektet{
    min-height: 200px;
    width: 90%;
    margin: 0px auto;
    cursor: pointer;
}

```

The whole php file

```
<?php
     include("./inc/connect.inc.php");
     $sql = $mysqli->query("SELECT * FROM projekt WHERE sort='startup' ORDER BY id DESC");
    while($row = $sql->fetch_array(MYSQLI_BOTH)){
    $alias  = $row['användare'];     $id = $row['id'];
    $headline = $row['headline'];
    $desc = $row['beskrivning'];
    $expertis = $row['expertis'];
    $other = $row['annat'];

    echo "<div class='projektet'><h3>".$alias." ".$expertis."".$other."</h3><h3>".$headline."</h3><p>".$desc."</p><a href='posts.php?id=".$id."'></a></div>";
}

?>

```

The alert that I tried directly after the click did not shw, so the problem must be in finding the div, which I think should be no trouble.