0

In this demo http://jsfiddle.net/pHJgP/8/ an image gets replaced with a text

I'd like to do the same on a blogger post http://myblog.blogspot.com/2015/06/firstpost.html

This code goes into post body:

<div id="outer"><img src="http://existdissolve.com/wp-content/uploads/2010/08/microsoft-logo-64x64.png"/></div>
<div id="text" style="display:none">Text here</div>

Where do I put this code?

$(document).ready(function()
    {
        setTimeout(function()
        {
            $("div#outer").fadeOut("slow", function ()
            {
                $("div#outer img").remove();                
                $("div#outer").html($("div#text").text());
                $("div#outer").show();
            });
         }, 3000);
     });

Do I need to add an operator to invoke the function or action in this particular post http://myblog.blogspot.com/2015/06/firstpost.html when it opens? And where/how do I add that operator or trigger code?

What else is missing ?

Before asking I've read several posts on stackoverflow.com , on w3schools.com , etc. experimented but failed due to the lack of knowledge.

elcont
  • 1
  • 1
  • possible duplicate of [How would I use this in my html structure?](http://stackoverflow.com/questions/20939203/how-would-i-use-this-in-my-html-structure) – Jongware Jun 20 '15 at 14:14
  • A possible duplicate --- my question may be different. It applies to blogspot - blogger and due to the lack of knowledge I am not able to apply answers from http://stackoverflow.com/questions/20939203/how-would-i-use-this-in-my-html-structure to my case. – elcont Jun 20 '15 at 15:47

1 Answers1

0

place this code just above or before </head>

<script src='http://code.jquery.com/jquery-1.7.2.js'/>
<script type='text/javascript'>
$(document).ready(function()
    {
        setTimeout(function()
        {
            $("div#outer").fadeOut("slow", function ()
            {
                $("div#outer img").remove();                
                $("div#outer").html($("div#text").text());
                $("div#outer").show();
            });
         }, 3000);
     });
</script>

Note: 1.7.2 is taken from the top left corner of the demo http://jsfiddle.net/pHJgP/8/

if 1.7.2 did not work, try other versions.

I am not a PRO. And this is all I know from experimenting.

I could be wrong

Ree Tom
  • 19
  • 6