Dailycoding.com

Download source | Back to article


Default

 
$(element).posterSwing();

Small angle

 
$(element).posterSwing({
    angle: 10
});

Fast

 
$(element).posterSwing({
    duration: 2000,
    angle: 10
});

Slow

 
$(element).posterSwing({
    duration: 16000
});

Custom swing center - 1

 
$(element).posterSwing({
    swingCenter: "50% 50%"
});

Custom swing center - 2

 
$(element).posterSwing({
    swingCenter: "50% 100%"
});

Whole body

$("body").posterSwing({
    duration: 2000,
    angle: 10
});

Source code

/*
  this code will be 
  poster swing
*/
$(this).next("pre")
  .posterSwing();

Button

$(this).posterSwing();

程序喵 —— http://www.ibloger.net/