在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:germanysbestkeptsecret/Wookmark-jQuery开源软件地址:https://github.com/germanysbestkeptsecret/Wookmark-jQuery开源编程语言:HTML 72.5%开源软件介绍:WookmarkThis is a plugin for laying out a dynamic grid of elements. See the documentation page 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 us a beer How to make the examples workFirst download or clone this repository.
Because we use the We will provide a special download in the future which contains all necessary packages. Further documentationWe are currently creating a new and better documentation at readthedocs.
Its automatically created by the sources in the The documentation can be rendered locally by installing Upgrading to version 2.0Since version 2.0 of Wookmark, the plugin doesn't depend on jQuery anymore. This allows you to use Wookmark without the overhead of the jQuery library. Because this meant a big change to the plugin, we also changed a lot in the code and tried to make it easier to use. The way you initialize the plugin is now different and a few options have changend. So if you upgrade you have to adapt your code. See the examples and this readme on how to do this. InstallationInstall with bower
Install with npm
jQuery is optional and is used in some of the examples to simplify the code a bit
Required filesCopy UsageThe plugin can be intialized in different ways. Default without jQuery
jQuery call with default settings:
Where Options
See the documentation page for details on available options. itemWidth and flexibleWidthThese values can be given as numbers which will be interpreted as pixels or you can use percentage strings like '20%'.
You can also provide a function which should return either a number or a percentage string.
When offset, outerOffset and verticalOffset
fillEmptySpaceThis creates placeholders at the bottom of each column to create an even layout. See ignoreInactiveItemsWhen set to comparatorYou 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 triggerElements 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.
or
or with jQuery
Resize triggerA relayout happens then the viewport is resized, you can also trigger this manually via
or with jQuery
FilterYou can filter all items of the handler when they have filters specified. See
If you just want to check if there would be a resulting list of items you can call filter with the Annotated codeSee our docco. Included examplesSome of the examples need the jQuery or imagesLoaded plugins. Be sure to run bower install to have them working. exampleIs 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-imagesIn 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://github.com/desandro/imagesloaded example-amdThis example shows how to load and initialize the plugin when using example-apiThis example shows how to load the tile data from a remote api and layout it. example-endless-scrollThis example shows how to add new tiles at runtime and refresh the layout. example-filterThis example shows to use the example-flexibleThis example shows how to use the example-lightboxThis example shows you how to include a lightbox. example-placeholderThis example shows you how to enable placeholders at the bottom of the tile layout to create an even footer. example-sortThis example shows how the FAQThe 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 othersBeware: 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.
Send a message if you want to be included with your site on this list! FeedbackPlease send code specific questions and feedback to Sebastian or contact him on twitter. If you have other questions and feedback which is for example related to Wookmark send a mail to Christoph or contact him on twitter. ContributingContribute! |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论