hi,
I am trying to recreate game spell UI using jQuery, kinda stuck here.
I know how to change src of image on click if it is in HTML code written the normal way (img src1, change to img src 2).
I do not know how to do this with sprite where is always only transparent.gif.
There is this toggle class jQuery but I am not sure it is the right one.
I need to get rid of class .example1 and replace it with .example2
Code Pen (info in .JS part)
http://codepen.io/krsiakdaniel/pen/6/3
demo online
http://labs.krsiak.cz/misc/legend-of-grimrock/
sprites
http://labs.krsiak.cz/misc/legend-of-grimrock/img/e-sprite.png
http://labs.krsiak.cz/misc/legend-of-grimrock/img/f-sprite.png