.after( content, [content] ) .after( function(index) )
<html> <head> <title>ThaiCreate.Com jQuery Tutorials</title> <style> p { background:yellow; } </style> <script type="text/javascript" src="jquery-1.6.4.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("p").after("<b>Hello</b>"); }); </script> </head> <body> <p>I would like to say: </p> </body> </html>
<html> <head> <title>ThaiCreate.Com jQuery Tutorials</title> <style> p { background:yellow; } </style> <script type="text/javascript" src="jquery-1.6.4.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("p").after( document.createTextNode("Hello") ); }); </script> </head> <body> <p>I would like to say: </p> </body> </html>
<html> <head> <title>ThaiCreate.Com jQuery Tutorials</title> <style> p { background:yellow; } </style> <script type="text/javascript" src="jquery-1.6.4.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("p").after( $("b") ); }); </script> </head> <body> <b>Hello</b><p>I would like to say: </p> </body> </html>
ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท