I'm building a site and in the header there is a mail icon. When you click the icon an input field and submit button appear so people can sign up for a newsletter. Is there a way to use width instead of using display:none and display:inline? So when you click the mail icon the input field is animated to slide out from the left rather than just instantly appear?
Here's the javascript code im using...
<!--Show & Hide Script Start-->
<script language="JavaScript">
function setVisibility(id1) {
if(document.getElementById('bt1').value=='H'){
document.getElementById('bt1').value = 'S';
document.getElementById(id1).style.display = 'none';
}else{
document.getElementById('bt1').value = 'H';
document.getElementById(id1).style.display = 'inline';
}
}
</script>
<!--Show & Hide Script End-->