In this video we will cover the mouseover event to change images.
Javascript code: http://pastebin.com/PKHFZ5fG
HTML code: http: http://pastebin.com/9sVZDL4p
Original source
In this video we will cover the mouseover event to change images.
Javascript code: http://pastebin.com/PKHFZ5fG
HTML code: http: http://pastebin.com/9sVZDL4p
Original source
11 responses to “JavaScript Tutorial for Beginners – 35 – Change image with mouseover”
thanks for making me laugh.
This thing can also be done by hovering also like – class:hover { img}
This is a fantastic series, teaching so much in so less time. Hats off to you! Reflects your hardwork!!
Thank you so much 🙂
one question, in the previous videos you used var text = getElementById but in this one you didn't equate getelemenetbyid to var text. why is that and why was it doen in the previous videos and still worked?
Piture lol
I shall bow UP to you my master, you are amazing
YOU ARE THE BEST !!! THANKS 🙂
its not working moreoverIi pasted the same code but its not showing any change!!!
Lol, when I mouseover, it changes to Lenin but when I mouseoff, it stays as Lenin! I'm running the code on Google Chrome.
Thank you for the great footage on learning , HTML, CSS, and JAVASCRIPT.
My computer is Mac.
I used textWrangler to write my code but having problem for the browser to read it.
So lately I switched to TextEdit and when I goes over the image, it does change the image but when
I move the mouse over , the last image is still there. The same happened with the prior lesson , changing the background color!
Do you know any " text editor" equal to Notepad++ that works for mac ?
hi,
im folowing your tutorials from html and css, and it was easy until i stuck in javascript. I copy and paste code from this video (i changed name of id and pictures in my doc), but mouse over and mouse off are not working. Dreamweaver find errors in my .js. code. In first line: "newPicture" is defined but never used; secound line: Missing "use strict" statemant; in third line: "oldPicture" is defined but never used; line four is missing strict like line two. So, functions are defined but never used, and document.getElementsById miss some "strict" comand. Can you help me to solve problem?