jqCustom.html
<html>
<head>
<title>The jQuery Example</title>
<script type="text/javascript" src="jquery-1.4.2.js">
</script>
<script type="text/javascript" src="custom.js"></script>
</head>
<body>
<div id="mydiv">
Click here to see a dialogue box.
</div>
</body>
</html>
custom.js
$(document).ready(function() {
$("div").click(function() {
alert("Hello Friends!");
});
});
$("div").click(function() {
alert("Hello Friends!");
});
});
We can include "custom.js" file as :
<script type="text/javascript" src="custom.js"></script>
0 comments:
Post a Comment