This time I will share jQuery Plugin and tutorial about Responsive Filterable And Draggable Grid System – Muuri, hope it will help you in programming stack.
Muuri.js is a powerful jQuery plugin used to generate a responsive, dynamic, animated, sortable, filterable grid layout for your modern web projects.
Key features:
- Allows to re-sort grid items via drag and drop. Requires hammer.js.
- Allows to filter/search through grid items via input field.
- Smooth, fast animations based on Velocity.js.
- Auto resizes and re-positions grid items on window resize.
- Lots of API methods and events.
View more:
How to use it:
1. Include the latest version of jQuery library and other required JS resources on the webpage.
1 |
< script src = "/path/to/jquery-3.1.1.min.js" ></ script > |
2 |
< script src = "/path/to/velocity.min.js" ></ script > |
3 |
< script src = "/path/to/hammer.min.js" ></ script > |
2. Add initial grid items to the layout system.
04 |
< div class = "item-content" > |
10 |
< div class = "item-content" > |
16 |
< div class = "item-content" > |
3. Apply your own CSS styles to the grid items and drag handlers.
04 |
border : 5px solid #ff0000 ; |
05 |
-moz-box-sizing: content-box; |
06 |
-webkit-box-sizing: content-box; |
07 |
box-sizing: content-box; |
19 |
.item.muuri-dragging, .item.muuri-releasing { z-index : 9999 ; } |
21 |
.item.muuri-dragging { cursor : move ; } |
23 |
.item.muuri- hidden { z-index : 0 ; } |
30 |
.item.w 2 { width : 210px ; } |
48 |
-moz-transform: scale( 1 ) translateZ( 0 ); |
49 |
-webkit-transform: scale( 1 ) translateZ( 0 ); |
50 |
-o-transform: scale( 1 ) translateZ( 0 ); |
51 |
-ms-transform: scale( 1 ) translateZ( 0 ); |
52 |
transform: scale( 1 ) translateZ( 0 ); |
53 |
-webkit-transition: -webkit-transform 0.2 s ease-out, background-color 0.2 s ease-out; |
54 |
-moz-transition: -moz-transform 0.2 s ease-out, background-color 0.2 s ease-out; |
55 |
-ms-transition: -ms-transform 0.2 s ease-out, background-color 0.2 s ease-out; |
56 |
-o-transition: -o-transform 0.2 s ease-out, background-color 0.2 s ease-out; |
57 |
transition: transform 0.2 s ease-out, background-color 0.2 s ease-out; |
60 |
.item.muuri-dragging .item-stuff { |
62 |
-moz-transform: scale( 1.1 ) translateZ( 0 ); |
63 |
-webkit-transform: scale( 1.1 ) translateZ( 0 ); |
64 |
-o-transform: scale( 1.1 ) translateZ( 0 ); |
65 |
-ms-transform: scale( 1.1 ) translateZ( 0 ); |
66 |
transform: scale( 1.1 ) translateZ( 0 ); |
4. Create a new Muuri object to initialize the grid layout.
5. All default options to customize the grid layout.
01 |
var
source : jqueryscript.net
|