<!DOCTYPE html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("p").click(function(){
$(this).hide();
});
});
</script>
</head>
<body>
<p>If you click on me, I will disappear.</p>
<p>Click me away!</p>
<p>Click me too!</p>
</body>
</html>
above written is the code i am using for testing jquery..
when i run the html file its not working in my browser.
this code runs well in my browser when i run it from w3schools.com.
please let me know what could be the reason for not working of this code. the java script is enable in my browser.
file://
URL). By leaving off the protocol, the OP is making it work on both anhttp
andhttps
page. Yes, really.