Question: ```
var $linkFullWidth = $('div.image--link');

if($(window).width() < 768){
    // Delete the element $linkFullWidth
}

```

How would I go about targeting this element and deleting it?

And is this valid JavaScript?

Thanks!

Answer: 
Remove the element with jQuery since you are already using it.

```
$('#linkFullWidth').remove(); //if the elements ID is linkFullWidth

```

or

```
$('.linkFullWidth').remove(); //if the elements CLASS is linkFullWidth(will delete all elements with this class though)

```

since you are already caching it in a variable then

```
$($linkFullWidth).remove(); //would do the job just fine

```
If you want to delete it when window resizes, then you need to listen to resize:

```
$(window).on('resize', function() {
    if($(window).width() < 768)
       $('your_element').remove;
});

```