Bonsoir,
J'essaie d'implémenter le code du tuto suivant: http://jsfiddle.net/x9ja7/, j'ai crée un fichier html:
Code html : 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 <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body onload="rotateme();"> <img src="arrow.png" id="image"> <script type="text/javascript" src="jquery.easing.min.js"></script> <script type="text/javascript" src="jQueryRotate.js"></script> <script type="text/javascript" src="work.js"></script> <script type="text/javascript" src="jquery-1.9.1.js"></script> </body> </html>
Un fichier work.js:
un fichier style.css:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 var rotateme = function(){ var value = 0 $("#image").rotate({ bind: { click: function(){ value +=170; $(this).rotate({ animateTo:value}) } } });}
Code css : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 #image{ margin:100px 100px; }
Le problème c'est que lorsque j'exécute mon code sur le navigateur, rien ne se passe et quand je consulte la console, je reçois ce message:
C'est quoi le problème à votre avis?ReferenceError: jQuery is not defined jquery.easing.min.js:11
ReferenceError: jQuery is not defined jQueryRotate.js:339
The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. rotate
TypeError: $(...).rotate is not a function work.js:8
Merci d'avance
Partager