html - Class inside class for jquery -


i want fade-in text using jquery. i've set up, doesn't seem work. perhaps can me problem? have:

.nav ul li { opacity: 0; padding: 0px 50px; transition: opacity 2s ease-in;  /* , more transitions other browsers */ }  .nav ul li.fade { opacity: 1; /* problem here: class inside of class */ } 

jquery:

$('ul.nav li').addclass('fade'); 

i hope can me out. not know fix problem. i've looked solutions, not think fix problem. in advance. edit: got example website , going try out.

edit 2: fiddle:

<title>title</title> <body> <div id='container'>         <div id='navleft' class='nav'>         <ul>         <li>link1</li>         <li>link2</li>         </ul>         </div>         <div id='logo'>         <img src='images/logo.png' alt='logo' />         </div>         <div id='navright' class='nav'>         <ul>         <li>link3</li>         <li>link4</li>         </ul>         </div> </div> </body> 

my tags:

<script type='text/javascript' src='//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js'></script> <script type='text/javascript' src="js/class.js"></script> 

judging jsfiddle, need use:

$('div.nav ul li').addclass('fade'); 

and change css to:

div.nav ul li.fade {     opacity: 1;  } 

because in html, <div> has class .nav:

<div id='navright' class='nav'> 

here's jsfiddle.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -