jQuery addBack() Method
home
Run
screen_rotation
fullscreen
cloud_download
<!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(){ $( "#demo-paragraph-before-addback" ).find("p").css( "background","yellow" ); $( "#demo-paragraph-after-addback" ).find("p").addBack().css( "background","yellow" ); }); </script> </head> <body> <div id="demo-paragraph-before-addback" style="padding:9px;border:1px solid black;"> <h3>Before AddBack</h3> This is Demo Div <p>Demo Paragraph.</p> <p> Demo Paragraph.</p> </div><br><br> <div id="demo-paragraph-after-addback" style="padding:9px;border:1px solid black;"> <h3>After AddBack</h3> This is Demo Div <p>Add Back.</p> <p> Demo Paragraph.</p> </div> </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(){ $( "#demo-paragraph-before-addback" ).find("p").css( "background","yellow" ); $( "#demo-paragraph-after-addback" ).find("p").addBack().css( "background","yellow" ); }); </script> </head> <body> <div id="demo-paragraph-before-addback" style="padding:9px;border:1px solid black;"> <h3>Before AddBack</h3> This is Demo Div <p>Demo Paragraph.</p> <p> Demo Paragraph.</p> </div><br><br> <div id="demo-paragraph-after-addback" style="padding:9px;border:1px solid black;"> <h3>After AddBack</h3> This is Demo Div <p>Add Back.</p> <p> Demo Paragraph.</p> </div> </body> </html>
Copyrights@tutorialsplane.com