I have an image and using jQuery I turned it into a button. The so-called button has two states: regular and pressed.
Using jQuery, I detect "mousedown" and "mouseup" and replace the src attribute as follows:
$("#btn").click(function() {
;
});
$("#btn").mousedown(function() {
$(this).attr({ src: regular.png });
});
$("#btn").mouseup(function() {
$(this).attr({ src : pushed.png });
});
When testing this offline mode it works great! But today, I noticed that when the images are stored on the server, it downloads the images again and again with each attribute change.
How to avoid this upload problem and make all images uploaded only once from the server?
Also, if you are better off doing what I'm trying to do here, please let me know.
Thanks.
thedp