Create a program select.html which will illustrate the various selectors & actions
<html>
<head>
<script type = "text/javascript" src = "https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js">
//specify the client side scripting language and include the jquery library file
</script>
<script type = "text/javascript">
$(document).ready(function()
{
$("button").click(function()
{
$(this).hide();
});
});
</script>
</head>
<body>
<button> Let me Hide </button>
</body>
</html>
<html>
<head>
<script type = "text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js">
//jquery library
</script>
<script type = "text/javascript">
$(document).ready(function()
{
$("p").click(function()
{
alert ("Hello user!!! You clicked on the alert");
});
});
</script>
</head>
<body> <p> Click on this alert </p></body>
</html>
$(document).ready(function()
{
$("p").click(function()
{
alert ("Hello user!!! You clicked on the alert");
});
});
After this, create a .html file named helloworld.html and provide a reference of the custom script and the jQuery library.
<html>
<head>
<script type = "text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js">
//jquery library
</script>
<script type = "text/javascript" src =”mycommon.js”>
//custom script
</script>
</head>
<body> <p> Click on this alert </p></body>
</html>