JQuery Comments
From w3cyberlearnings
Contents |
jQuery Comment jQuery Code
Add comment to jQuery code is important for documentation. Use double forward slash (//) for comment jQuery code.
Syntax
<script language="javascript"> $(document).ready(function(){ // your comment }); </script>
Example
<html> <head> <title>Basic Jquery</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script type="text/javascript" src="jquery.min.js"> </script> <script language="javascript"> $(document).ready(function(){ // this will assign the Hello World! to the <p> element. $("p").html("Hello World!"); }); </script> </head> <body> <p></p> </body> </html>
Related Links
- jQuery Library
- jQuery First Project
- jQuery Comments