PHPHell Newsletter

Name:
Email:
We have 45 guests online

Latest Comments


JQuery Tutorial: Footer Bar Like Facebook
Monday, 05 April 2010 07:57

Description

This is a quick and dirty tutorial to show you how to implement JQuery to make yourself a footer bar like Facebook. This isn't a perfect example but works in IE.


What You Will Need


Demonstration

Refer to the demo here.


Implementing

Step One: Include the .js files

<script src="/jquery.js" type="text/javascript" ></script>
<script src="/float.js" type="text/javascript" ></script>

Step Two: Place the following between the head tags:

<script type="text/javascript">
 $(document).ready(main);
 function main(){
 $("#networkbar").makeFloat({x:"current",y:"current",speed:"fast"});
}		
</script>
#networkbar <- You can edit this to reflect the id of the div.
speed:"fast" <- options are: fast, medium, slow, normal. I edited this a bit to add the "medium" and to make fast scroll a bit faster than provided.

Step Three: Create the Div

In the demo, I included networkbar.php into index.php and added css to the networkbar id. I would suggest doing something similar so your network bar can be portable to other pages.

Bugs

I don't like the "blinking" effect that happens when you scroll the page. I tried my best to stop that by editing this line:

case 'fast': this.steps = 1; break;

However, any value lower than 1 causes the code to break.

Download Tutorial Files


25% Off Hosting: use coupon code PHPDiscount and get 25% off your first month at HostGator.



Comments (0)Add Comment

Add a Comment
smaller | bigger

security code
Write the displayed characters


busy
Last Updated on Monday, 05 April 2010 08:25
English Arabic Czech Dutch Filipino French Greek Hebrew Icelandic Italian Macedonian Portuguese Spanish Swedish