UPDATE!: Due to Google code hosting problem, I updated all widget scripts and they are moved to Github. If you are using any of Way2blogging widgets, please update your widget code with latest widget code. sorry for this Inconvenience!. Thank You.

How to Add Image Hover Effect (CSS/jQuery ) to Blogger / Blogspot

July 14, 2010   /   Posted by in Blogger Hacks, Blogger Tricks 15 Comments
How to Add Image Hover Effect (CSS/jQuery ) to Blogger / Blogspot

Hi Friends! Now you can add Image hover effect to images in blogger very easily.

This trick allows your images to some transparency (Not all Images only specified images). when your mouse over on image it will turn to no transparent will make hover effect.

I am giving three types of image hover effects

  1. CSS Opacity Effect
  2. CSS Border Effect
  3. jQuery Fading Effect

Watch Live Demo here

How to Add Image Hover Effect to Blogger?

CSS opacity Effect

  1. Login to Blogger Dashboard
  2. Go to Design And select Edit HTML tab
  3. And Search ]]></b:skin> tag
  4. Add bellow CSS code just before it
    a.thumbopacity img {
     filter:alpha(opacity=50);
     -moz-opacity: 0.5;
     opacity: 0.5;
     -khtml-opacity: 0.5;
    }
    a.thumbopacity:hover img {
     filter:alpha(opacity=100);
     -moz-opacity: 1.0;
     opacity: 1.0;
     -khtml-opacity: 1.0; 
    }
  5. Save your template.

Now turn your Image links to hover effect.

Your Normal code to create link with image like bellow

<a href="/index.html" ><img  border="0" src="/2010/07//sample.jpg" /></a>

Define a class of class=”thumbopacity” to your Normal code Then modified code is bellow

<a href="/index.html" class="thumbopacity" ><img  border="0" src="/2010/07//sample.jpg" /></a>

CSS Border Effect

  1. Login to Blogger Dashboard
  2. Go to Design And select Edit HTML tab
  3. And Search ]]></b:skin> tag
  4. Add bellow CSS code just before it
    .thumbborder img{
        border: 2px solid #ccc;
    }
    .thumbborder:hover img{
        border: 2px solid navy;
    }
    .thumbborder:hover{
        border-color: red; 
    }
  5. Save your template.

Now turn your Image links to hover effect.

Your Normal code to create link with image like bellow

<a href="/index.html" ><img  border="0" src="/2010/07//sample.jpg" /></a>

Define a class of class=”thumbborder” to your Normal code Then modified code is bellow

<a href="/index.html" class="thumbborder" ><img  border="0" src="/2010/07//sample.jpg" /></a>

jQuery Fading Effect

  1. Login to Blogger Dashboard
  2. Go to Design And select Edit HTML tab
  3. And Search ]]></b:skin> tag
  4. Add bellow JavaScripts just before it

    a.Add jQuery script bellow (Skip this step if you already having jQuery script)

    <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js' type='text/javascript'></script>

    b.Add this JavaScript before </head> tag

    <script type="text/javascript">
        $(document).ready(function() {
            $(".thumbs img").fadeTo("slow", 0.6);
            $(".thumbs img").hover(function() {
                $(this).fadeTo("slow", 1.0);
            }, function() {
                $(this).fadeTo("slow", 0.6);
            });
        });
    </script>
  5. Save your template.

Now turn your Image links to hover effect.

Your Normal code to create link with image like bellow

<a href="/index.html" ><img  border="0" src="/2010/07//sample.jpg" /></a>

Define a class of class=”thumbs” to your Normal code Then modified code is bellow

<a href="/index.html" class="thumbs" ><img  border="0" src="/2010/07//sample.jpg" /></a>

Leave your Comments

Do you Like this Article?

rss twitter facebook
Get Subscribe to Free Email Updates!!
*Your email address will not be shared with anyone.

15 Comments on “How to Add Image Hover Effect (CSS/jQuery ) to Blogger / BlogspotAdd Comment

  1. hamada July 14, 2010 9:57 am #

    thanks for that .

  2. BlackPoint October 9, 2010 12:28 pm #

    this is the best blog i've seen
    thaks a lot for your tutorials

  3. dheeraj yadav November 9, 2010 2:34 pm #

    hi this is nice coding, but i want to creat borders with semitransparent effect in my blog, do you have any idea about it.

  4. prem November 29, 2010 2:22 pm #

    masterwire.blogspot.com

  5. Ashish May 3, 2011 12:24 am #

    I want to add this effect on my widget called " you may also like this". So how will i embed this code on widget. waiting for your reply. Thanks
    http://discoverdreamland.blogspot.com

  6. Harish May 6, 2011 2:23 pm #

    @Ashish
    the thumbnails in Related post widget are in the form of background images
    so we can't apply this hover effect :(

  7. Daus May 21, 2011 4:05 am #

    it is possible without changing the html code?.. argh so tired

  8. Harish May 22, 2011 4:27 am #

    @Daus

    Please provide more details. i will definitely help you.

  9. Bobby June 18, 2011 8:36 pm #

    Hi…can u tell me how to give effect without adding "class" ?

  10. pvn July 9, 2011 9:59 am #

    hi!! i have come here only today but many tricks discussed here are really awesome!! thanx

  11. Prayag Verma July 17, 2011 4:34 pm #

    thanks a lot

  12. Varinder Pal Singh September 2, 2011 9:22 am #

    Thankssssssss Helped A Lot Its Amazing!!

  13. Abhishek singh October 5, 2011 9:12 pm #

    great

  14. Parbat October 15, 2011 11:15 pm #

    Hey Harris Bro, can u plz tell me how to make auto links in image for each posts. my url is www.findhindimovies.blogspot.com

  15. Aleksandar March 5, 2012 6:32 am #

    Thak you Harish very much.I succeeded to implement the effect on my blog,but I have one more question for you:How to implement CSS opacity effect for embed videos.Can you help me with that stuff?Thanks in advance.

    Leave a Reply

     
    © 2012 Way2blogging. Designed by +Harish, Powered by WordPress