Question: I have html scheme like

```
<li>Some text <a href='#' class='click'>Remove</a> <input type='hidden' ></li>

```

And i have OnClick function like

```
$(".click").click(function() {
    // i need to select 'li' and then delete it
    // i have this code, but its not working
    $(this).prev('li').remove();
    return false;
});

```

How do I Select previous html tag onClick ?

Answer: 
`li` is not the previous element, but the parent:

```
$(".click").click(function () {
    $(this).parent().remove();
    return false;
});

```
`.prev` is for siblings, in your case, `li` is parent, so you could use `.closest`.

```
$(".click").click(function () {
        $(this).closest('li').remove();
        return false;
});

```