Showing posts with label JAVA SCRIPT. Show all posts
Showing posts with label JAVA SCRIPT. Show all posts

How To Add JavaScript Snowfall Effect in blogger ?

To add snowflakes without using any images you just need to add a single line of JavaScript code. Follow the steps given below to add the snowfall effect in your blog.


Add Snowflakes background effect in blogger using JavaScript

Note: Before making any changes to your template, take a full backup of your blogger template.

#Step 1. Log in to your Blogger Dashboard and Navigate to Design> Edit HTML and Check theExpand Widget Templates Check box.

Design Edit HTML - Expand Widget Template


#Step 2. Find this code: </body> and put below JavaScript code right before the </body> tag.

<script src='https://sites.google.com/site/addinblogger/how-to-add-in-blogger/AddSnowfalleffectinblogger.js' type='text/javascript'></script>

#Step 3. Save template and done!.

Note: If background color of your blog is black then it will look very pretty, because of the snow color, which is of course would be white :)

Javascript to Display Total Posts Comments and Online Users in Blogger

Now you can show total number of posts, total number of comments and total number of current number of online readers of your blogger hosted blog, this trick/tip is for you with which You can show total number of posts, comments and number of users online, in your blog using HTML/Javascript Widget. After the following below given steps, you will get the results as shown in below shown picture.
Javascript to Display Total Posts Comments and Online Users in Blogger

if you want to show the statistics of your blog as shown in above picture, just follow the steps given below.
  • On Your Dashboard, Click on Layout (see below shown picture for further assistance)
Select Blogger Layout

Now Add an HTML/Javascript Widget and Paste Below given code in that HTML/Javascript Widget.

<script style="text/javascript">
function totalPosts(json) {
document.write('Stories: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');
}
function totalComments(json) {
document.write('Comments: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');
}
</script>
<script src=" /feeds/posts/default?alt=json-in-script&callback=totalPosts"></script>
<script src=" /feeds/comments/default?alt=json-in-script&callback=totalComments"></script>
<p style="margin-top: 0; margin-bottom: 0">
<table border="0" bordercolor="#111111" id="AutoNumber1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">
<tr>
<td width="35%">
Online Readers:</td>
<td width="65%"><p style="margin-top: 0; margin-bottom: 0"><b><script src="http://fastonlineusers.com/on3.php?d=YOURBLOG" type="text/javascript"></script></b></p></td>
</tr>
</table></p>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-4679235-4");
pageTracker._trackPageview();
} catch(err) {}</script>


Modify YOURBLOG to your blog address/url ( myblog.blogspot.com) and you are done !!.

Twitter Delicious Facebook Digg Stumbleupon Favorites More