Jquery ne fonctionne pas.
djun1
Messages postés
30
Statut
Membre
-
djun1 Messages postés 30 Statut Membre -
djun1 Messages postés 30 Statut Membre -
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 :
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 :
<!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>
3 réponses
en mettant le lien du fichier correct
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
Profil bloqué
bien vu !