Ads 468x60px

Pages

Tampilkan postingan dengan label effect. Tampilkan semua postingan
Tampilkan postingan dengan label effect. Tampilkan semua postingan

Kamis, 12 September 2013

Fade In Out Page Loading Effect On Blogger Posts

A very common effect in jQuery is the fade effect that hides or shows an element by fading it, and we can use it in many ways as for example in the blogs navigation. The following script does just that, by loading the page with a fading effect when we browse on internal links that are in the blog, such as post titles, labels links, archive, navigation links, etc..
jQuery effect, fade in effect, blogger jQuery
You can see an example in this demo blog, click on the title of any post and see the fading effect when the page is loading.

How To Implement the Fade In Loading Effect

1) To put this fading effect on your blog, go to your Template > Edit HTML :

fading effect, blogger blogspot, blogger tricks

2) Click anywhere inside the code area and search for the </head> tag using CTRL + F keys:


3) Then, just above </head> add the following code:
<script src=http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js type=text/javascript/>
<script type=text/javascript>
//<![CDATA[
$(document).ready(function() {
$("body").css("z-index", "-10");
$("body").fadeIn(0);

$("a").click(function(event){
event.preventDefault();
linkLocation = this.href;
$("body").fadeOut(500, redirectPage); });
function redirectPage() {
window.location = linkLocation;
}
});
//]]>
</script>
<style>
html {
background-color: #F2F2F2; /* Color fading */
}
</style>
4) Save the changes and thats it. In green you can see where to change the color that fades on a loading page.

The original script hides the body of the page while loading, I prefer to change that property with a negative z-index to avoid problems with the search engine robots that may effect the positioning.

Problems?

Consider that such effects could increase the blog loading time, so I recommend using it only when your blog loads fast and does not have too many scripts.

If you already use another version of jQuery remove the other, leaving only this which will be readed first.

If you are using Mootools or Scriptaculous, then you have to make some modifications to the code in order to be compatible.

If you have another script with a fade effect, then it could interfere with this and you might not see anything on the page except the color fading, in such cases it is better without this script.

You can also use this effect only on some links, for example, if you want to appear only when you click on the post titles in the navigation links (older posts and newer posts), and on the top tabs, then replace this line:
$("a").click(function(event){
With this:
$(".post-title a, .blog-pager-older-link, .blog-pager-newer-link, .tabs").click(function(event){
In some cases, the page can load for a second and then load with the fade effect, this may be "normal" because the browser is slow to read the script on page load.

Apart from these drawbacks, I think its a very elegant way to load blog pages while browsing them, dont you think?
Read More..

Sabtu, 07 September 2013

How to remove hide or add a Peek A Boo Effect to your Blogger Navbar

What is Blogger Navbar?
Frist time somebody creates a blog in blogger.com, a bar will show up at the very top of a blog page. This bar is known as the Blogger Navbar (Blogger Navigation Bar) and it usually appears by default at the top of every hosted Blogspot blog.

Blogger navbar functions include:
  • [B] (blogger logo): takes you back to bloggers homepage
  • Search Blog: you can make searches on the blog and results will appear directly on the page.
  • Follow: you can follow the blog youre currently viewing (blog updates will appear on your Blogger dashboard at Reading List - if youre not logged, youll see a Share link, which allows you to share you favorite blogs on social networks like Twitter, Facebook, Google buzz, and Google Reader)
  • Report abuse: you can report a blog if you consider its content objectionable (e.g., pornography);
  • NextBlog: takes you to a random, recently-updated Blogger blog.
  • email address@: If you are logged in to your account, youll see your own address here. Other viewers will see their own email addresses, or none at all if they arent logged in.
  • Post: Direct link to the post editor
  • Design: this link takes you to Page Elements, where you can add gadgets/widgets for your blog
  • Sign In/Out: This displays the appropriate option, depending on whether youre logged in or not.

Blogger navbar is available in several colors, and is configured in the Template tab in Bloggers interface.

It can be useful but the only real disadvantage is visual. If you have customized design, Navbar usually doesnt fit in.

In this tutorial, Ill show you how to remove it or add a peek-a-boo effect.

Removing/Hiding the Blogger Navbar
blogger, what is blogger, blogger tutorials

Step 1. Go to: Dashboard > Template > Edit HTML:


 ... select the "expand widget templates" box



Step 2. Find (CTRL + F) the following line:

]]></b:skin>

Step 3. Just above it, paste this code:

#navbar {
height: 0px;
visibility: hidden;
display: none;
}

Step 4. Save your Template.

blogger blogspot, remove navbar, peek a boo, designTheres another way of showing a Navbar. It is called
"Hover Peek-a-boo Blogger Navbar":

The navbar will only appear when you hover around the area on the top. To see it in action, take a look at this demo

Add a Peek-a-Boo Effect to Blogger/Blogspot Navbar


Step 1. Login to your Blogger Dashboard, then go to Design >> Edit HTML > check "expand widget templates"

Step 2. Search for the following piece of code:

]]></b:skin>

Step 3. Add the following code just above it:

#navbar-iframe{opacity:0.0;filter:alpha(Opacity=0)}
#navbar-iframe:hover{opacity:1.0;filter:alpha(Opacity=100, FinishedOpacity=100)

Step 4. Save the template... and youre done!

If you have any questions, leave a comment below.
Read More..