https://github.com/multum/better-size
Plug-in for setting the same block height (maximum). Demo: https://codepen.io/JoyZi/pen/zdKQYw
https://github.com/multum/better-size
Last synced: 8 months ago
JSON representation
Plug-in for setting the same block height (maximum). Demo: https://codepen.io/JoyZi/pen/zdKQYw
- Host: GitHub
- URL: https://github.com/multum/better-size
- Owner: multum
- Created: 2017-09-03T19:58:57.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-03T20:13:38.000Z (almost 9 years ago)
- Last Synced: 2025-08-17T01:55:36.495Z (10 months ago)
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BetterSize
Плагин для установки одинаковой высоты блоков(по максимальной). Demo: https://codepen.io/JoyZi/pen/zdKQYw
### Settings
Option | Type | Default
------ | ---- | -------
elements | string | $(this).find(">div")
childClass | string | "content"
afterChange | function | null
### Methods
Method | Argument | Description
------ | -------- | -------------------------------------------
resize | | Recalculation of height of elements
```javascript
$(".current_items").betterSize("resize")
```
### [Demo](https://codepen.io/JoyZi/pen/zdKQYw)
### Инициализация после подключения самого плагина
```javascript
$( document ).ready( function () {
$(".current_items").betterSize({
elements: ".item",
childClass: "child",
afterChange: function (el, height) {
console.log(el, height);
}
});
});
```