Thursday, April 4, 2013

Widgets

0

Randomize Blogger Background color using Jquery

  • Thursday, April 4, 2013
  • Unknown














  • Blogger is free platform and easy to use,now making blog and website attracting is very important,think about background that change on each page load activity of user.Yes,its is possible but not with CSS its can be done through jquery. Blogger background will be randomly change every time reloaded.It look awesome when new visitors doesn't know this trick.

    Randomize Blogger Background Jquerry

    This trick is by jquery this is done by randomizing the background color of blogger.It can be done by overriding the default background color or by removing background from css and adding this code.

    • Log in to blogger.
    • Then click template and edit and click proceed.
    • Then search for </head>
    • Then above that code paste the below code.
    <script>
    $(function() {
        function randomColor() {
            return 'rgb('+Math.round(Math.random()*255)+', '+Math.round(Math.random()*255)+', '+Math.round(Math.random()*255)+')'
        }
        $('body').each(function(i) {
           $(this).css('background', randomColor());
        });
    });
    </script>
    • Then save the template.
    • Now try few times after saving the template it will work.
    Having any trouble comment below

    0 Responses to “ Randomize Blogger Background color using Jquery ”


    *Important - If you want to be informed of any replies to your comment, check the "Subscribe By Email" before submitting. Please Do Not Spam

    Post a Comment