jQuery contents Method
home
Run
screen_rotation
fullscreen
cloud_download
<!DOCTYPE html> <html> <head> <title>jQuery Closest 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(){ $( "div" ).contents().css( "background","yellow" ); }); </script> </head> <body> <p>Dummy Text .......</p> <div> <h3>This is demo content Heading...</h3> <p>Demo Paragraph.......</p> </div> </body> </html>
<!DOCTYPE html> <html> <head> <title>jQuery Closest 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(){ $( "div" ).contents().css( "background","yellow" ); }); </script> </head> <body> <p>Dummy Text .......</p> <div> <h3>This is demo content Heading...</h3> <p>Demo Paragraph.......</p> </div> </body> </html>
Copyrights@tutorialsplane.com