jquery - simple logic - javascript involved -
i dont want plugin this. have 3 images shown in 2 different ways.

i want write onclick function in each img, when click small one, should replace big one. vision this:
<img class="locationfoto" src="image-path"> <--- main foto <img class="locationfoto1" src="image-path-1" onclick="moveme(this)"> <img class="locationfoto2" src="image-path-2" onclick="moveme(this)"> my js:
function moveme(me){ // how can this? } appreciate help.
well, can set image displayed in locationfoto as:
function moveme(me){ $('.locationfoto').attr('src', me.src); }
Comments
Post a Comment