Web.QHMIT
.com
Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
Run
<!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() { $( "ul" ).find( "li ul" ).css( "background-color", "yellow" ); }); }); </script> <button>Highlight all nested lists</button> <ul> <li>Apples <ul> <li>Big ones</li> <li>Juicy ones</li> <li>Red ones</li> </ul> </li> <li>Oranges</li> <li>Papaya <ul> <li>Papaya carica</li> <li>Carica</li> <li>Carica pubescens</li> </ul> </li> <li>Lychee</li> <li>Rambutan</li> <li>Passionfruit</li> <li>Mango</li> </ul>
Preview