Joshua Joshua -4 years ago 139
HTML Question

.fadeOut not working with very simple code

I am trying to make a navigation menu for a blog I am working on, currently I am trying to make it where when the 'Home' tab is clicked on the other two fade out. I do not know why this code is not working as it is a pretty simple few lines of code. I am not going to add in the CSS as I do not believe it will have anything to do with this problem. Thank you!

<div id='bckDrp'>
<div id='nav'>
<ul id='navLst'>
<li class='navOp' id='hme'>Home</li>
<li class='navOp' id='abt'>About</li>
<li class='navOp' id='prt'>Portfolio</li>

var main = function(){
$('#abt, #prt').fadeOut();


Answer Source

You aren't actually calling the main function at all.


Should be the JQuery format:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download