Jump to: navigation, search

JQuery First Project

From w3cyberlearnings

Contents

jQuery First Project

In this section, you write jQuery to interact with HTML element.

Syntax

<script language="javascript">
	$(document).ready(function(){
		// your code
	});
</script>

Example TRY-IT

In this example, we assign the Hello World! to the <p> element.

<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(){
				$("p").html("Hello World!");
			});
		</script>
	</head>
	<body>
		<p></p>
	</body>
</html>

Related Links


Navigation
Web
SQL
MISC
References