I am using this code in the JavaScript to show/hide div. Now i wanna add transition in JavaScript, But can't seem to get it to work.
Div Code
<div class="checkout_other"> <a class="jmbag" href="javascript:void(0);" onclick="showCheckoutOther(this);"><span>+</span>Order Message</a>
<div class="subbox_other">
<div class="p-message-title">Leave a message for Admin:</div>
<textarea name="postscript" cols="100" rows="2" id="postscript" class="message-text ui-textfield ui-textfield-system multiple no-hit" placeholder="Mention If Any Special Request / Instructions About Your Order">{$order.postscript|escape}</textarea>
<p class="message-text-tip">Max. 1,000 English characters or numerals only. No HTML codes.</p>
</div>
</div>
JavaScript Code
<script type="text/javascript">
{literal}
function showCheckoutOther(obj){
var otherParent = obj.parentNode;
otherParent.className = (otherParent.className=='checkout_other') ? 'checkout_other2' : 'checkout_other';
var spanzi = obj.getElementsByTagName('span')[0];
spanzi.innerHTML= spanzi.innerHTML == '+' ? '-' : '+';
}
{/literal}
</script>
Is it possible to make some animation, like fadout, easeout instead of just showing it?