Make your stuff stick!

是否曾经希望将某个页面元素 在某段文本旁边?是否需要让某个元素一直挂在某个位置而不管是否滚动条滚动?

jQuery.Pin 能帮你完成这些需求。它能将任意页面元素“钉”在某个容器顶部,而且在尺寸小的屏幕上能够自动禁用这种效果。


Github 代码库 下载 jquery.pin.js文件。然后在页面底部引入jQuery 和 jQuery.pin即可。




      containerSelector: ".container"


      minWidth: 940

Pin it!

Great for pinned navigations — or just about anything you want to stick.

Developed by Webpop.


Just like the Webpop documentation? Pin it and relax.

Brownie topping cake oat cake liquorice bear claw candy canes tiramisu apple pie. Pudding oat cake sugar plum sweet roll gingerbread. Cake jelly-o candy canes dragée. Tiramisu sugar plum cupcake cotton candy tootsie roll sweet. Jujubes gingerbread donut fruitcake cheesecake sweet roll soufflé. Tootsie roll donut sesame snaps marzipan candy carrot cake chocolate cake. Tootsie roll applicake chupa chups. Caramels wafer gummies chocolate pastry liquorice apple pie chocolate chocolate. Fruitcake lollipop cupcake apple pie pie dessert powder cotton candy bear claw. Dragée muffin caramels gummi bears sesame snaps wypas cheesecake oat cake.

Gummies jelly-o oat cake. Oat cake dessert muffin apple pie carrot cake halvah chocolate cake. Ice cream faworki fruitcake. Lemon drops fruitcake marshmallow oat cake apple pie. Jelly danish pastry liquorice halvah tart gingerbread. Soufflé sweet soufflé biscuit sesame snaps jelly beans liquorice dessert apple pie. Cake ice cream candy toffee croissant sesame snaps topping candy. Halvah dessert macaroon sweet halvah marzipan caramels cake.

下载jQuery.Pin! What are you waiting for?

jQuery.Pin 由Bootstrap中文网翻译整理

Fork me on GitHub