[![Stories in Ready](https://badge.waffle.io/gbks/wookmark-jquery.png?label=ready&title=Ready)](https://waffle.io/gbks/wookmark-jquery)
jQuery Wookmark
===============
This is a [jQuery](http://www.jquery.com) plugin for laying out a dynamic grid of elements.
See the [documentation page](http://www.wookmark.com/jquery-plugin) for examples.
The repository also includes many functional examples. All images used in the example are copyrighted
by their respective owners and only included for showcasing plugin functionality.
Do you like this project?
[Buy me a beer](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TSN2TDYNKZHF4)
Installation
------------
### Prequisites
* [jQuery](http://www.jquery.com) - 1.4.3 or better
### Required files
Copy `jquery.wookmark.js` to your javascript folder.
Usage
-----
The plugin can be called with jQuery in different ways.
### Standard call with default settings:
$('.myElements').wookmark();
Where `myElement` is the class of the items you want to lay out in a grid.
### Options
$('.myElements').wookmark({
align: 'center',
autoResize: false,
comparator: null,
container: $('body'),
direction: undefined,
ignoreInactiveItems: true,
itemWidth: 0,
fillEmptySpace: false,
flexibleWidth: 0,
offset: 2,
onLayoutChanged: undefined,
outerOffset: 0,
possibleFilters: [],
resizeDelay: 50,
verticalOffset: undefined
});
See the [documentation page](http://www.wookmark.com/jquery-plugin) for details on available options.
#### itemWidth and flexibleWidth
These values can be given as numbers which will be interpreted as pixels or you can use percentage strings like '20%'.
When `flexibleWidth` is set an `itemWidth` != 0 is used as minimum item width. As example using a `flexibleWidth` of 40% will result in two columns with 10% space to the sides of the container.
#### offset, outerOffset and verticalOffset
`offset` is the horizontal and vertical space between two tiles.
`outerOffset` is the space between the outer tiles and the parent container.
`verticalOffset` is optional and can be set to achieve a vertical offset between two tiles which is different from `offset`.
#### fillEmptySpace
This creates placeholders at the bottom of each column to create an even layout. See `example-placeholder` on how to use it. These placeholders use the css class `wookmark-placeholder`. You can overwrite it in your own css to fit your needs.
#### ignoreInactiveItems
When set to `false` inactive items will still be shown when filtered. This can be used to fade out filtered items. See the example-filter/fade.html example.
#### comparator
You can use this option to provide a custom comparator function which the plugin will use to sort the tiles. See example-sort or example-stamp on how to use it.
### Refresh trigger
Elements which are hidden have cannot be laid out until they are visible. If you use wookmark on a hidden tab layout will not be immediately performed. When the tab is made visible you can manually refresh wookmark using a trigger on your container.
$('#myContent').trigger('refreshWookmark');
### Filter
You can filter all items of the handler when they have filters specified. See `example-filter` for details how to do this.
The call to filter will also return the resulting list of items.
handler.wookmarkInstance.filter([filters=[]][,mode='or'][,dryRun=false]);
If you just want to check if there would be a resulting list of items you can call filter with the `dryRun` option set to `true`.
Included examples
-----------------
### example
Is the preferred setup. In this scenario the width and height of all images is set in the HTML img attributes.
The grid layout can be performed as soon as the document is rendered, BEFORE images are loaded.
### example-load-images
In this example, the width and height of the images is not known. Via Paul Irish's imagesLoaded plugin (slightly
modified by desandro). The grid layout is performed after all images are loaded and their dimensions can be
retrieved. This approach is much slower. The imagesLoaded plugin can also be found on github right here:
https://gist.github.com/797120
### example-amd
This example shows how to load and initialize the plugin when using `require.js` or a different amd loading method.
### example-api
This example shows how to load the tile data from a remote api and layout it.
### example-endless-scroll
This example shows how to add new tiles at runtime and refresh the layout.
### example-filter
This example shows to use the `filter` feature of the plugin to show just the tiles the user wants.
### example-flexible
This example shows how to use the `flexibleWidth` option. This option allows your tiles to grow a certain amount, as long as there is room. When using percentage values for the width options you can create a fixed column count layout.
### example-lightbox
This example shows you how to include a lightbox.
### example-placeholder
This example shows you how to enable placeholders at the bottom of the tile layout to create an even footer.
### example-sort
This example shows how the `sort` feature works. This option allows you to specify a sorting function which will rearrange your tiles.
For example you can use it to sort your tiles containing products by price, popularity or name.
FAQ
--------
### The tiles overlap after loading.
You should use the 'imagesloaded' plugin. Most the examples in this package include the code how to use it.
### The tiles overlap after their height is changed.
Use the 'finished'-callback of your animation/effect to trigger 'refreshWookmark' on the container element supplied to the plugin.
### The placeholders at the end of each column have wrong heights or positions.
Set 'position: relative' on your container element and check if there are other elements in the container before your tiles.
### My question isn't answered here.
Send us some feedback or create an issue on github.
Mentioned or used by others
---------------------------
Beware: These links lead to sites which are not necessarily related to the authors of the Wookmark plugin so we don't have any control over their content.
* [Customize the plugin online with bitconfig](http://bitconfig.com/woomark/bitconfig_woomark.html)
* [TYPO3 extension for YAG](http://typo3.org/extensions/repository/view/yag_themepack_jquery)
* [Drupal Wookmark plugin](https://drupal.org/project/views_wookmark)
* [Tumblr template example](http://theme-hunter.tumblr.com/post/31126746878/creating-tumblr-grid-layouts-with-wookmark)
Send a [message](mailto:sebastian@helzle.net) if you want to be included with your site on this list!
Feedback
--------
Please send code specific questions and feedback to [Sebastian](mailto:sebastian@helzle.net) or contact him on [twitter](http://twitter.com/sebobo).
If you have other questions and feedback which is for example related to Wookmark send a mail to [Christoph](mailto:chri@sto.ph) or contact him on [twitter](https://twitter.com/gbks).
Contributing
------------
Contribute!
没有合适的资源?快使用搜索试试~ 我知道了~
jQuery插件库
共972个文件
txt:187个
as:168个
cs:106个
17 下载量 186 浏览量
2018-01-29
15:42:05
上传
评论 1
收藏 13.78MB RAR 举报
温馨提示
jQuery插件库jQuery插件库jQuery插件库jQuery插件库jQuery插件库
资源推荐
资源详情
资源评论
收起资源包目录
jQuery插件库 (972个子文件)
URI.as 75KB
Tweener.as 41KB
Equations.as 29KB
main.as 25KB
Round3D.as 22KB
Dome.as 20KB
JPGEncoder.as 19KB
RoundGlass.as 17KB
DateUtil.as 17KB
SpecialPropertiesDefault.as 16KB
PlasticFlat.as 15KB
JSON.as 15KB
JSONTokenizer.as 14KB
PieSliceContainer.as 14KB
JSON.as 14KB
Round.as 13KB
Plastic.as 12KB
XAxis.as 11KB
printf.as 11KB
ScreenCoords.as 11KB
CylinderOutline.as 11KB
Pie.as 10KB
TweenListObj.as 10KB
Base.as 10KB
MD5.as 9KB
JSONEncoder.as 9KB
XAxisLabels.as 9KB
SHA256.as 9KB
scat.as 9KB
YAxisBase.as 9KB
SHA224.as 9KB
DateUtils.as 9KB
Tooltip.as 9KB
SHA1.as 8KB
Line.as 8KB
Css.as 8KB
Cylinder.as 8KB
RFC2817Socket.as 7KB
PointDotBase.as 7KB
StringUtil.as 7KB
YAxisLabelsBase.as 7KB
PieSlice.as 7KB
JSONDecoder.as 7KB
Base.as 7KB
Tag.as 6KB
LineBase.as 6KB
ObjectCollection.as 6KB
ArrayUtil.as 6KB
ScatterLine.as 6KB
PNGEncoder.as 5KB
Parser.as 5KB
ECandle.as 5KB
XMLUtil.as 5KB
tr.as 5KB
BarBase.as 5KB
URIEncodingBitmap.as 5KB
Element.as 4KB
StackCollection.as 4KB
Factory.as 4KB
WSSEUsernameToken.as 4KB
Bar3D.as 4KB
bow.as 4KB
RadarSpokeLabels.as 4KB
URLLoaderBase.as 4KB
Menu.as 4KB
anchor.as 3KB
Glass.as 3KB
star.as 3KB
JSONToken.as 3KB
IURIResolver.as 3KB
RadarAxisLabels.as 3KB
RadarAxis.as 3KB
menuItem.as 3KB
JSONParseError.as 3KB
ScatterBase.as 3KB
Horizontal.as 3KB
BarStack.as 3KB
DictionaryUtil.as 3KB
NumberFormat.as 3KB
PropertyInfoObj.as 3KB
AuxFunctions.as 3KB
Keys.as 3KB
Background.as 3KB
ServiceEvent.as 3KB
NumberFormatter.as 3KB
Loading.as 3KB
IllegalStateError.as 3KB
JSONTokenType.as 2KB
Area.as 2KB
HBar.as 2KB
DynamicURLLoader.as 2KB
NumberUtils.as 2KB
Sketch.as 2KB
YLegendBase.as 2KB
ScreenCoordsRadar.as 2KB
Properties.as 2KB
ServiceBase.as 2KB
InnerBackground.as 2KB
BitString.as 2KB
PieLabel.as 2KB
共 972 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10
资源评论
hepeiguang
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功