Reputation: 23
my simple HTML : tesJQUERY.html
<html>
<head>
<title>Tes JQuery</title>
<script type="text/javascript" src="tes.js"></script>
</head>
<body>
<div >
hahaha
</div>
</body>
</html>
my simple jQuery script : tes.js
$(document).ready(function() {
$('div').hide();
});
I have connected them and it was displayed in my dreamweaver..but not working...
Upvotes: 0
Views: 97
Reputation: 3168
You need to include external jquery in your html file either by downloading it or using online version like:
<script type="text/javascript" src="jquery.js"></script>
or
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
You can download the latest versions of jquery from below URL:
http://code.jquery.com/jquery-1.8.3.min.js (compressed, for production)
http://code.jquery.com/jquery-1.8.3.js (uncompressed, for debugging)
Upvotes: 1
Reputation: 22415
<html>
<head>
<title>Tes JQuery</title>
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="tes.js"></script>
</head>
<body>
<div >
:D :D :D
</div>
</body>
</html>
Upvotes: 0
Reputation: 44740
You need to include jQuery like this (before including your tes.js
)
<html>
<head><title>Tes JQuery</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script type="text/javascript" src="tes.js"></script>
</head>
<body>
<div> hahaha </div>
</body>
</html>
Upvotes: 2