There is no .fadeIn() method for DOM elements.
document.getElementById('ques_2').fadeIn(1000);
You probably see some jQuery code or some other library code. This code should execute on a jQuery object (or whatever) that wraps your DOM element.
Another approach that will work in modern browsers would be to use the CSS3 transition. You could apply JavaScript to the new class and let CSS take care of the visual effect.
If you want to use the jQuery library, you need to import it into your page. For example, put this in the head your page:
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
Then follow the API rules to retrieve the DOM elements and call methods.
You can use your own DOM methods to extract or just use jQuery, which makes sense if you decide to download it.
source share