fi.adm,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
$(function()
{
$('.element').click(function (event)
{
if($(event.target).is(".text_element")) return;
$('.text_element', this).remove();
$('.delete', this).remove();
}
);
}
);
</script>
</head>
<body>
<div class='element'>
<div class='text_element'>text_element 1</div>
<div class='delete'> X</div>
</div>
<div class='element'>
<div class='text_element'>text_element 2</div>
<div class='delete'> X</div>
</div>
</body>
</html>