Jquery

How do I get my external js file of Jquery to work? It works well when placed within the html file, but not in the external file. It does nothing. My jqueryexample.js file looks like this:

<script>
$(document).ready(function(){
    $("p").click(function(){
        $(this).hide();
    });
});
</script>

My jqueryexample.html file looks like this:

<!DOCTYPE html>
<html>
<head>
<script src=jquery.min.js"></script>
<script src="jqueryexample.js"></script>
<title>jqueryexample</title>
</head>
<body>

<p>If you click on me, I will disappear.</p>
<p>Click me away!</p>
<p>Click me too!</p>
</body>
</html>		
May 23rd, 2015 4:16am

You are posting in the wrong forum.  This is an admin scripting forum. I think you want a web development forum.

Try this: http://forums.asp.net/130.aspx/1?HTML+CSS+and+JavaScript

Free Windows Admin Tool Kit Click here and download it now
May 23rd, 2015 4:39am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics