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 :)

25 条评论:

Lin Huang 说...

caihuanglin20150520
prada outlet
oakley sunglasses
true religion jeans
chanel handbags
coach outlet online
burberry outlet online
true religion sale
cheap jordans
coach factory outlet
abercrombie
michael kors outlet
air max 90
coach factory outlet
gucci outlet online
ray ban sunglasses
ray ban sunglasses
michael kors outlet online
oakley sunglasses sale
burberry scarf
pandora jewelry
ray bans
fitflops outlet
ralph lauren outlet
christian louboutin outlet
rolex watches
michael kors bag
pandora outlet
caoch outlet
gucci outlet
chanel online shop
chanel bags
hollister clothing
kate spade handbags
coach outlet
ralph lauren
coach outlet store online
oakley sunglasses wholesale
ray ban glasses
polo ralph lauren
tory burch outlet online

One J 说...

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

John 说...

longchamp soldes
adidas running shoes
tory burch outlet
fitflops
abercrombie and fitch
abercrombie kids
michael kors
longchamp handbags
louis vuitton outlet
louis vuitton handbags
fitflop sale
michael kors outlet online
pandora charms
tory burch handbags
michael kors handbags
michael kors outlet online
louis vuitton outlet
michael kors outlet
lv outlet
ed hardy clothing
gucci bags
louis vuitton handbags
red timberland boots
abercrombie and fitch outlet
oakley vault
chi flat irons
coach outlet store online
polo ralph lauren
201576yuanyuan

Wenhao Guo 说...

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

Junda Xu 说...

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

huangqing 说...

polo ralph lauren
ralph lauren shirts
coach outlet
ralph lauren outlet
michael kors outlet
nike tn pas cher
nike air force 1
cheap mlb jerseys
ralph lauren uk
ferragamo shoes
kate spade uk
mulberry outlet
timberland boots
ferragamo shoes
oakley sunglasses
kobe bryant shoes
adidas trainers
michael kors outlet
calvin klein underwear
coach outlet online
coach outlet online
nike air max
michael kors sale
michael kors outlet sale
coach outlet store
babyliss flat iron
mulberry sale
toms outlet store
michael kors factory outlet
cazal outlet
cheap snapbacks
oakley canada
ralph lauren outlet
cheap jordan shoes
cheap oakley sunglasses
16.5.28qqqqqing

Gege Dai 说...

jianbin0802
versace sunglasses on sale
ferragamo shoes
ugg outlet
michael kors uk
nfl jerseys wholesale
oakley sunglasses
ugg boots
christian louboutin outlet
christian louboutin uk
ugg boots
reebok shoes
marc jacobs outlet
adidas nmd runner
polo ralph lauren
michael kors outlet
michael kors outlet clearance
michael kors outlet online
tory burch outlet online
true religion outlet uk
cartier sunglasses
tiffany and co
ray-ban sunglasses
coach outlet
ugg outlet
ray ban sunglasses
ugg uk,ugg outlet,ugg boots outlet
cheap nba jerseys
air max 90
burberry outlet
fitflops sale
michael kors handbags
cheap snapbacks
michael kors outlet online
michael kors outlet clearance

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

chenlina 说...

polo ralph lauren
clarisonic
coach outlet
ugg slippers clearance
louis vuitton outlet
ralph lauren polo outlet
toms shoes outlet
michael kors
ugg outlet
adidas nmd
jordan retro
denver broncos jerseys
canada goose jackets
adidas yeezy
ray ban wayfarer
rolex watches outlet
michael kors handbags
ralph lauren outlet
michael kors outlet
fitflop shoes
seattle seahawks jerseys
red bottom shoes
uggs
cheap nfl jerseys
uggs sale
rolex watches
ugg boots
christian louboutin sale
nfl jerseys wholesale
canada goose
ray ban sunglasses uk
coach factory outlet
ugg boots
pandora jewelry
canada goose sale
cheap uggs
ray ban sunglasses
ugg sale
canada goose outlet
uggs on sale
chenlina20161105

dong dong23 说...

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

Unknown 说...

versace
nike free
nike roshe
new orleans saints jerseys
michael kors outlet
coach factory outlet online
the north face outlet
michael kors outlet clearance
ray ban sunglasses
ralph lauren

Unknown 说...

uggs outlet
michael kors outlet
cheap oakley sunglasses
rolex watches
true religion jeans
longchamp handbag
true religion jeans
ray ban sunglasses
nike roshe one
burberry canada
chanyuan2017.01.18

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 说...

jianbin0206
louis vuitton outlet
toms shoes
true religion jeans
uggs outlet
louis vuitton
louis vuitton handbags
oakley sunglasses
true religion jeans
pandora outlet
michael kors canada

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

chenmeinv0 说...

ray ban outlet
hermes handbags
cheap ray bans
michael kors outlet
polo ralph lauren
coach outlet
le coq sportif shoes
ray ban eyeglasses
adidas originals superstar
new balance shoes
hzx20170410

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

shengda xu 说...

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

Gege Dai 说...

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

chenlina 说...

oakley sunglasses for men
michael kors handbags sale
canada goose
kate spade outlet
nike shoes outlet
coach outlet store online
coach factory outlet
coach outlet online
coach outlet online
christian louboutin uk
coach outlet
20170615wanglili

happy 123 说...

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

ninest123 说...

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