js">

Tuesday, 2 February 2016

Change Background Color in Blogger


Hello Guys, Today i post one good HTML tags for you with this tag you are give new every time. Now Let's see.  

: How Changing Background Works :

Before moving towards the tutorial and let us explan that how this method works? It is jQuery scrip which automates the process of changing post background colors in jQuery with every refresh whenever blogger post pages is refreshed then it changes the color of your blogger site.

: How to Automatically Change Background color in Blogger :


  • First of all sign in Blogger Account.
  • After that go to the Template.
  • Then click on Edit HTML.
  • Now Press CTRL+F and find this tag </head>.
  • And paste following code just above in your blogger template.
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js?ver=1.5' type='text/javascript'/>
<script type='text/javascript'>//<![CDATA[
function get_random_color(){var e="0123456789ABCDEF".split("");var t="#";for(var n=0;n<6;n++){t+=e[Math.round(Math.random()*14)]}return t}$(function(){$(".post").each(function(){$(this).css("background-color",get_random_color())})})//]]></script>

NOTE: In case your template already includes a jquery.min.js file then don't add the following line of code in your template because this will cause things to not work.

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js?ver=1.5' type='text/javascript'/>

  • In Last click on Save Template.
This is the one of the good tip for the new experience for your readers and with every refresh page you give new to your readers i hope you all like that please comment on this post..

0 comments:

Post a Comment