jquery - simple logic - javascript involved -


i dont want plugin this. have 3 images shown in 2 different ways.

enter image description here

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

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -