I am using frames, and would like the page to load开发者_开发技巧 using animated gifs, but once loaded, I want the links to be jpegs with rollovers. Is it possible to have the final image a jpg loaded after the animated gif?
Uh, I don't really get what you're doing, but you change the src of an image in jquery like this:
$('.myimageselector').attr('src', 'mynewimage.jpg');
If you are saying you would like to convert a gif to a jpg on the client side, then no. You could always have something running server side sending them the files in the form of jpg (after being converted from gifs).
You can easily do this using the jQuery .hover
function.
like this:
$('imageselector').hover(function(){
$(this).attr('src','newimage.jpg');
},function(){
$(this).attr('src','oldimage.gif');
});
Here is my example:
http://jsfiddle.net/MarkKramer/UEhFu/
精彩评论