Kelb56 Kelb56 - 1 year ago 130
jQuery Question

Jquery fadeIn() not working

Description: I am trying to

my container using jquery, but it doesn't work. I'm kinda new to it, only fresh out of codeacademy jquery course.

Problem: the method I wrote in myScript.js file doesn't seem to work. The syntax looks to be ok compared to other examples. I got my js file linked to the html file like this:

<script type="text/javascript" src="/Content/js/myScript.js"></script>

This is my index.cshtml file where I created a container for some navigation:

<div class="container" id="fade">
//some other buttons, divs, etc

This is my custom js file that I included:

$(document).ready(function () {

Answer Source

You should hide the div by default if you want to fade it in, otherwise it is already showing and fading in won't do anything. If that's the case, your html should look like this:

<div class="container" id="fade" style="display: none;">
    //some other buttons, divs, etc
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download