2009/02/18

jQuery plugin: Scrollite

I wrote a simple jQuery plugin today, called Scrollite. This plugin makes it easier to create a float layer, scrolling with the page. Here's the code:
jQuery.fn.scrollite = function(left, margin, duration) {
margin = parseInt(margin) || 0; duration = parseInt(duration) || 0;
return this.each(function() {
  var target = jQuery(this).css({position: 'absolute', zIndex: 10000})
      .css(left ? 'left' : 'right', margin + 'px');
  jQuery(window).bind('load scroll resize', function() {
      target.animate({top: (jQuery(window).height() + window.scrollY - target.height() - margin) + 'px'}, duration);
  });
});
};
Features & options:
  • Float it without writing CSS code.
  • Place the float container in the left or right (default);
  • Customize the speed of sliding by set duration time in millisecond (Immediately sliding is default behavior);
  • Customize the margin by set margin in pixel (default: 0)
Usage:
  • $('#node').scrollite();
    Paramless call, use all default options;
  • $('#node').scrollite(false, 10);
    Put it in the right with 10-pixel-margin;
  • $('#node').scrollite(true, 5, 20);
    Put it in the left with 5-pixel-margin, complete slide in 20 milliseconds.
Demo:
Just navigate to this page, and check out the simple code :)

21 条评论:

Unknown 说...

michael kors
ralph lauren outlet
louis vuitton handbags
coach outlet online
retro 11
oakley sunglasses wholesale
coach outlet online
cheap oakley sunglasses
kd shoes
coach factory outlet
jordan 5
abercrombie store
true religion jeans
jordan 8 playoffs
coach outlet online
retro jordans
oakley sunglasses wholesale
burberry scarf
red timberland boots
tods outlet
football jerseys
michael kors
cheap oakley sunglasses
louis vuitton
oakley sunglasses
20150603yuanyuan

Unknown 说...

oakley sunglasses, http://www.oakleysunglassesdiscount.us.com
ghd
kate spade handbags
louis vuitton outlet
kansas city chiefs jerseys
michael kors outlet
coach outlet store
pandora
pandora charms
custom mlb jerseys
michael kors outlet
gucci outlet
ray ban sunglasses
hollister uk
cheap jordans, http://www.jordan-shoes.us.com
coach outlet
ghd hair straighteners
air max 2014
timberland boots
links of london uk
designer handbags,handbags outlet,cheap handbags,purses and handbags,wholesale handbags,designer bags,bags outlet,handbags wholesale,cheap purses,discount handbags,handbags sale,wholesale purses,handbags and purses,designer purses
polo ralph lauren outlet
tory burch outlet
instyler ionic styler
air max 90
fred perry sale
rolex watches uk
nike roshe run
ray-ban sunglasses, http://www.ray-bansunglassess.in.net
michael kors outlet online
bottega veneta outlet
insanity workout
louis vuitton handbags
salomon shoes
chicago bulls jersey
green bay packers jerseys
achang0817

Unknown 说...

20151027 junda
coach factory outlet
nfl jerseys
Gucci Outlet Online Sale
Abercrombie T-Shirts
hollister clothing store
ugg boots
michael kors outlet
Michael Kors Outlet Handbags Factory Price
ugg boots
toms outlet
abercrombie
mont blanc
michael kors outlet
michael kors outlet
Coach Outlet Store Online Shop
canada goose outlet
michael kors outlet
Abercrombie and Fitch Outlet Sale
Louis Vuitton Bags Outlet Store
michael kors bags
Wholesale Authentic Designer Handbags
ugg outlet store
air max 95,nike golf,nike janoski,air max 1,nike canada,nike plus,nike shox,nike factory store
michael kors handbag
Louis Vuitton Handbags For Cheap
cheap ugg boots
Christian Louis Vuitton Red Bottoms
coach outlet store online
true religion outlet
canada goose jackets

mmjiaxin 说...

nike free 5
coach outlet store
louis vuitton,borse louis vuitton,louis vuitton sito ufficiale,louis vuitton outlet
chanel handbags outlet
ugg outlet
lululemon pants
ralph lauren outlet
los angeles clippers
cheap ugg boots
black friday deals
ralph lauren outlet
ray ban outlet
nike air max uk
karen millen uk
cheap nfl jersey
nike trainers
coach outlet store
chanel outlet
uggs outlet
miami dolphins
mm1031

chenmeinv0 说...

gucci bags
ugg boots
coach factory outlet
tommy hilfiger clothing
pandora charms sale clearance
louis vuitton borse
coach outlet online
oakley vault
uggs outlet
ugg boots
2016.10.5xukaimin

fangyaoting 说...

fangyanting20161010
toms shoes
moncler jackets
true religion jeans
longchamp outlet
coach outlet
canada goose outlet
ray ban sunglasses sale
canada goose jackets
the north face jackets

chenlina 说...

chenlina20161012
adidas trainers
uggs for cheap
ugg boots
louis vuitton outlet
louis vuitton paris
uggs on sale
michael kors outlet
hollister clothing
coach outlet
louis vuitton outlet

Unknown 说...

seattle seahawks jerseys
ray ban sunglasses cheap
canada goose outlet
ugg classic
kate spade handbags
kate spade sale
ralph lauren outlet online
oakley sunglasses outlet
doudoune moncler
adidas shoes
2016.12.28chenlixiang

chenmeinv0 说...

mcm handbags
kate spade handbags
adidas outlet store
nike blazer high
michael kors handbags
nike cortez classic
nike huarache ultra
nike roshe run femme
mlb jerseys wholesale
calvin klein jeans
20172.6chenjinyan

Unknown 说...

ralph lauren polo
christian louboutin
cheap jordans for sale
longchamp handbags
nike trainers
adidas nmd runner
kobe bryant shoes
michael kors outlet online
cazal sunglasses
instyler ionic styler
chanyuan2017.03.17

Unknown 说...

ralph lauren outlet online
polo ralph lauren
michael kors handbags
michael kors handbags sale
valentino shoes
yeezy boost 350
cheap oakley sunglasses
nike tn pas cher
new york jets jerseys
coach factory outlet

Unknown 说...

kate spade outlet
michael kors handbags
michael kors outlet
michael kors handbags
michael kors
christian louboutin
adidas outlet
louis vuitton outlet store
chicago white sox jerseys
true religion
xushengda0602

Unknown 说...

true religion jeans sale
polo ralph lauren
air max 2015
pandora outlet
coach outlet clearance
soccer jerseys wholesale
cheap ray ban sunglasses
tory burch outlet stores
ralph lauren outlet stores
louis vuitton outlet online
20170610lck

Unknown 说...

nike zoom
cartier bracelet
louboutin shoes
yeezy shoes
curry shoes
ultra boost
nmd
adidas outlet online
adidas outlet
cheap jordans

匿名 说...

cheap jordans
coach outlet
supra shoes
cheap jordans
polo ralph lauren
burberry outlet canada
michael kors outlet store
mulberry handbags
sac longchamp pas cher
nike free 5.0
mt0726

匿名 说...

coach outlet
canada goose jackets uk
coach outlet store
canada goose uk
pandora charms sale
ugg outlet
adidas yeezy boost
ray ban sunglasses discount
gucci handbags
doudoune moncler
mt0314

Unknown 说...

2018418 leilei3915
michael kors outlet clearance
supreme clothing
gucci outlet store
michael kors outlet clearance
mlb jerseys
nfl jerseys
pandora jewelry
true religion outlet
coach outlet online
coach outlet store online

raybanoutlet001 说...

zzzzz2018.4.27
christian louboutin outlet
canada goose outlet
ray ban eyeglasses
louboutin shoes
canada goose outlet
bears jerseys
prada handbags
christian louboutin outlet
minnesota vikings jerseys
coach factory outlet

Unknown 说...

qzz0707
coach outlet online
ray ban sunglasses
ubiq shoes
nike shoes
oakley sunglasses
oakley sunglasses
carrera sunglasses
belstaff jackets
kate spade outlet
air max 2017

[email protected] 说...

20180721 junda
trailblazers jerseys
kobe shoes
uggs outlet
bvlgari jewelry
adidas nmd
mulberry handbags
tory burch outlet
mulberry handbags
ralph lauren polo
mulberry handbags

jan 说...



ارخص نقل عفش بالرياض ارخص نقل عفش بالرياض