Modify homepage image animation in Blogger Galauness template

One of the blog reader and user of Galauness blogger template recently asked how to change the homepage image effect to just a  "static image"  or some different animation of choice. I thought to post the solution so that it helps others too.

{ SETPS TO FOLLOW }


  • Back-up (export) your template before any modification. In-case something is messed-up you can restore (import) it from the backup. You can find the "Export Blog" (and Import Blog) option under: 

Settings -> Other -> BlogTools -> Export Blog


  • Edit the template. You can find the option "Edit HTML" under:

Template -> Edit HTML


  • Now in the HTML code find (CTRL+F) the code snippet similar to the below snippet:

$(function() {$('.snips-image').hover(function(){$(this).find('img').animate({top:'220px'},{queue:false,duration:200});}, function(){$(this).find('img').animate({top:'0px'},{queue:false,duration:200});});})

That's the code responsible for the image animation in the homepage.


  • If you want no animation and just need static image:  comment the snippet and save the template. You can comment a JavaScript snippet with  /*  */ characters


So the commented snippet should look like this :

/* 
$(function() {$('.snips-image').hover(function(){$(this).find('img').animate({top:'220px'},{queue:false,duration:200});}, function(){$(this).find('img').animate({top:'0px'},{queue:false,duration:200});});})
*/


  • What if you want to change the animation instead of displaying just a static image ? For example, you want to fade-out the image on mouse hover and fade back in on mouse out. 


You need modify the snippet like this:

$(function() {
	$('.snips-image').hover(function() {
		$(this).find('img').animate({
			opacity: 0
		}, {	
			queue: false,
			duration: 500
		});
	}, function() {
		$(this).find('img').animate({
			top: '0px',
			opacity: 1
		}, {
			queue: false,
			duration: 500
		});
	});
})

Of-course there're many other ways of doing it. I've implemented the above code in this blog too, just check out the homepage.
  • For more animation & effects, follow the official JQuery documentation:

http://api.jquery.com/animate/
http://api.jquery.com/category/effects/


11 comments:

  1. i want to remove post summary and jumplink, how do i do that?

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. THANK YOU! I've been trying to stop those images from moving for weeks! Thank you so much for sharing :) off to go have a look at all the other effects I can put in its place x

    ReplyDelete
  4. My thumbnail picture is suddenly not showing in my newest post.. :((
    I'm using my own picture, I uploaded it on blogger..
    I've tried to delete the pic, re-upload the pic, change the pic, resize the pic, re-posting the blog post, all don't work..
    I read in one article, I have to change the title, I did, and it still not working..
    So frustrating, can you help?

    ReplyDelete
    Replies
    1. I'm experiencing the same problem as Laura except mine occurred after I moved to my own domain. Any ideas on why this is the case?

      Delete
    2. Kamal: from another blog said this -

      Image url not use HTTPS or HTTP.
      Please go to edit post than html mode.find out image url,change image url with HTTP not HTTPS. or when image url without HTTP please use it by your self.SAVE N DONE !!!!(sory My english not Good)

      So what you'll do is change the (first image) to HTTP if it is HTTPS. - Sonja Sky

      Delete
    3. Thanks it works now, do you know if I have to do this every time I post though?

      Delete
  5. Happened the same to me! It happened after disabling "mobile version" in Blogger.

    ReplyDelete
  6. how do I remove snippets from this template? It'd be great if you could enlighten me! thank u

    ReplyDelete
  7. One of my thumbnails is not showing aswell. Idk what to do, because it's HTTP instead of HTTPS and none of the pictures work on this post (copied, url, upload). Please help!

    ReplyDelete
    Replies
    1. This is the same for me :( Did you figure it out?

      Delete