change icon on html page upon user action using css or javascript

Hellraizer

New Member
I am quite a newbie web development having basic knowledge in \[code\]HTML CSS\[/code\] and \[code\]JavaScript\[/code\]. I have a small blog page, which allows users to upvote a title of a blogpost - similar to what SoF has on its questions.So, the problem I am facing is that I am unsure how I should change the icon (which I have in a sprite) once the user has clicked on it. So, in a nut shell\[code\](Page1) icon1.png --> User Clicks --> (Page1) icon2.png\[/code\]where icon1.png and icon2.png are in my \[code\]sprites.png\[/code\]I think JS is the way to go for this - but I was wondering if it is (is doing some sort of \[code\]AJAX\[/code\] the way to do it?)- any directions would be much appreciated.Thanks.
 
Back
Top