Bonjour,

Je suis débutant en Jquery. Au tout début de mon apprentissage, Il y a eu problème. Le jquery ne fonctionne pas. J'ai testé ce code sur w3school, ça a fonctionné. Ensuite, jai copié coller le sur un fichier html. Pourtant, ça n'a pas marché sur mon fichier html. Comment puis-je faire?

Comment faire pour que ce code marche sur fichier html :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!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>