I am new in JavaScript & jQuery so, kindly don’t mind my very basic question:
I have made the following div which I want to show when certain JavaScript function being called:
<div id='faix' class="bg4 w460 h430 tac poa dpn">
<h4 class="fwb fs22 cf3 mb5 ff3 mt150 ">Thank you John for contacting us!</h4><h4 class="fwb fs22 cf3 mb5 ff3"> We will get in touch with you shortly.</h4>
</div>
but when that function being called and I passed this to that function then the respective div with id of “faix” is not showing up
$('#faix').fadeIn(500);
What am I doing wrong with the above code?
Your code is ok; I think you’re calling it, when the html isn’t build yet. Wrap your code in a $(document).ready: