Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
<!DOCTYPE html> <title>My Example</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script> $( function() { $( "button" ).click( function() { $( "li" ).not( ":odd" ).fadeOut( "slow" ); }); }); </script> <button>Fade out the even list items (i.e. the "non-odd" ones)</button> <ul> <li>Apples</li> <li>Oranges</li> <li>Papaya</li> <li>Lychee</li> <li>Rambutan</li> <li>Passionfruit</li> <li>Mango</li> </ul> <p>Even ones start at the first list item (zero-based indexing).</p>