jQuery children() Method
home
Run
screen_rotation
fullscreen
cloud_download
navigate_next
<!DOCTYPE html> <html> <head> <title>add - jQuery Example</title> <script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js"> </script> <script type="text/javascript"> $(document).ready(function(){ $( "ul" ).children().css( "background","yellow" ); }); </script> </head> <body> <div>Demo Div</div> <ul> <li>First Item</li> <li>Second Item</li> </ul> </body> </html>
<!DOCTYPE html> <html> <head> <title>add - jQuery Example</title> <script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js"> </script> <script type="text/javascript"> $(document).ready(function(){ $( "ul" ).children().css( "background","yellow" ); }); </script> </head> <body> <div>Demo Div</div> <ul> <li>First Item</li> <li>Second Item</li> </ul> </body> </html>
Copyrights@tutorialsplane.com