I have a div with class footer-contact
and inside that div, I have several input
and textarea
elements. I want to empty their text. I tried using the following selector but it doesn't work. What am I doing wrong?
$(".footer-contact input[type=text] textarea").val('');
$(".footer-contact,input[type=text],textarea").val('');
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type='text' class='footer-contact' value='asdas'>
<input type='text' value='asdas'>
<textarea>asdas</textarea>