Tech News Today, Marshmallow Custom Rom, Huawei, Run Programs, Network, Chromebook, Bank Account

Sabtu, 24 Oktober 2015

How To Add Random Posts Widget to Blogger

How To Add Random Posts Widget to Blogger - To all visitors of this blog, I say welcome and thank you for visiting the blog Tech News Today Look for all the things you need that are available on this blog. If not available, please leave suggestions and comments for the development of this blog. now we will discuss first about How To Add Random Posts Widget to Blogger we have collected a lot of information from sources to create this article, so please see.

Articles : How To Add Random Posts Widget to Blogger
full Link : How To Add Random Posts Widget to Blogger

You can also see our article on:


How To Add Random Posts Widget to Blogger

Follow the easy steps below to add Random Posts Widget to your blog.

1.Log in to your dashboard--> layout- ->Page Elements

2.Click on Add a Gadget on the sidebar.

3.Select HTML/Javascript and add the javascript code given below and click save.

<div id="myLuckyPost"></div> 
<script type="text/javascript"> function showLucky(root){ var feed = root.feed; var entries = feed.entry || []; var entry = feed.entry[0]; for (var j = 0; j < entry.link.length; ++j){if (entry.link[j].rel == 'alternate'){window.location = entry.link[j].href;}}} function fetchLuck(luck){ script = document.createElement('script'); script.src = '/feeds/posts/summary?start-index='+luck+'&max-results=1&alt=json-in-script&callback=showLucky'; script.type = 'text/javascript'; document.getElementsByTagName('head')[0].appendChild(script); } function feelingLucky(root){ var feed = root.feed; var total = parseInt(feed.openSearch$totalResults.$t,10); var luckyNumber = Math.floor(Math.random()*total);luckyNumber++; a = document.createElement('a'); a.href = '#random'; a.rel = luckyNumber; a.onclick = function(){fetchLuck(this.rel);}; a.innerHTML = 'Are ya feeling lucky, punk?'; document.getElementById('myLuckyPost').appendChild(a); } </script> 
<script src="/feeds/posts/summary?max-results=0&alt=json-in-script&callback=feelingLucky"></script>



information How To Add Random Posts Widget to Blogger has been completed in the discussion.

hopefully the article we give the title How To Add Random Posts Widget to Blogger can provide knowledge for you in living everyday life in determining the gadget that suits your needs.

you just read the article about How To Add Random Posts Widget to Blogger if this article is useful for you and want to bookmark it or share it please use the link http://sihanandi.blogspot.com/2015/10/how-to-add-random-posts-widget-to.html thank you and do not forget to comment if anyone.

Tag :
Share on Facebook
Share on Twitter
Share on Google+
Tags :

Related : How To Add Random Posts Widget to Blogger

0 komentar:

Posting Komentar