Showing posts with label jquery. Show all posts
Showing posts with label jquery. Show all posts

How to add jQuery Plugin: Scroll to Top to Blogger


After reading an article "jQuery Plugin: Scroll to Top" by Craig Wilson a couple of weeks ago, here is how to add it to your Blogger.

There is a similar code by David Walsh here. But I am using a code by Craig.

You can see the action in this page. You just need to scroll down a bit and you will see a ^Scrol to Top box on the right bottom. By clicking it you go to the top of the page.

1. Add the following HTML before your </body> tag.


<a href="#" id="toTop">^ Scroll to Top</a>



2. Add the following CSS code in your Blogger CSS code.


/* to top */
#toTop { width:100px;background:#F4FFBF;border:1px solid #ccc;text-align:center;padding:5px;position:fixed;bottom:10px;right:10px;cursor:pointer;color:#666;text-decoration:none; }



3. Add the following jQuery codes just before </body> tag.


<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' type='text/javascript'></script>
<script type='text/javascript'>
/*-----------------------
* jQuery Plugin: Scroll to Top
* by Craig Wilson, Ph.Creative (http://www.ph-creative.com)
*
* Copyright (c) 2009 Ph.Creative Ltd.
* Description: Adds an unobtrusive "Scroll to Top" link to your page with smooth scrolling.
* For usage instructions and version updates to go http://blog.ph-creative.com/post/jquery-plugin-scroll-to-top.aspx
*
* Version: 1.0, 12/03/2009
-----------------------*/

$(function(){$.fn.scrollToTop=function(){$(this).hide().removeAttr("href");if($(window).scrollTop()!="0"){$(this).fadeIn("slow")}var scrollDiv=$(this);$(window).scroll(function(){if($(window).scrollTop()=="0"){$(scrollDiv).fadeOut("slow")}else{$(scrollDiv).fadeIn("slow")}});$(this).click(function(){$("html, body").animate({scrollTop:0},"slow")})}});

$(function() {
$("#toTop").scrollToTop();
});
</script>



Read the rest of this entry »

The undocumented life of jQuery .append()

The undocumented life of jQuery's .append()

Posted using ShareThis
Read the rest of this entry »

Easy Display Switch with CSS and jQuery by By Soh Tanaka


Easy Display Switch with CSS and jQuery is another image display for your portfolio. Simple and effective.
You can see the demo here.
Read the rest of this entry »

Creating a “Filterable” Portfolio with jQuery by Trevor Davis

Trevor Davis wrote a tutorial called "Creating a “Filterable” Portfolio with jQuery" in nettuts.com
You can find a demo here.
You can use it for a customer's portfolio and add a jquery lightbox.


Read the rest of this entry »

jQuery Accessible Tabs - How to make tabs REALLY accessible by Dirk Ginader

Improved version of jquery tab by Dirk Ginader.
Read the rest of this entry »

jQuery Animation - Sliding In and Out, Up and Down

Video tutorial from Vimeo.

jQuery Animation - Sliding In and Out, Up and Down from Jack Franklin on Vimeo.
Read the rest of this entry »

Creating a Scrolling Gallery Using jQuery

Video tutorial from From-the-couch


Read the rest of this entry »

jQuery menu- snook version

I found a jquery menu at snook.ca.
I needed to change a little bit to make it a bit subtle. So I created this one.

I know someone must have done it, but I couldn't find it.

This works with IE6/7, Chrome and FF3. It should work with Safari and Opera.
Read the rest of this entry »
 
^ Scroll to Top