Consider the following code:
var socialProvider = $('#loginProvider').val();
Based on the data which populates the value attribute of #loginProvider, this
code will select one of six separate png images and make it appear in
What I want to know is how would I modify this code to use an image sprite of
the same six icons (see attached) instead of the individual images?
My assumption is it would involve using jquery to add and remove CSS classes
with perhaps coordinates to locate and expose each individual icon on the sprite
as needed. Or would jquery handle the coordinates directly? Or am I totally
offbase on this?
Also, in general, when is it recommended and NOT recommended to use image