🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

jquery.normalize-grid-rows

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jquery.normalize-grid-rows

jQuery plugin for grid-of-boxes layouts that will update the heights of elements, row by row, so that each row has the same height.

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

jQuery.normalizeGridRows

A jQuery plugin for grid-of-boxes layouts to adjust the heights of elements so that each row of elements has the same height, that of the largest in the row. It can listen for window resize or other events to re-apply itself.

Usage

Include jQuery and this plugin (either dist/jquery.normalize-grid-rows.js or dist/jquery.normalize-grid-rows.min.js) in your page, then invoke: $(".myboxes").normalizeGridRows(); where ".myboxes" is a jQuery selector to locate the elements of interest. This will adjust the collection one time.

Plugin options can specify events like resize and orientationchange to automatically reapply the behavior when the named events are triggered. A debounce interval prevents applying the behavior multiple times when the events are triggered in rapid succession.

To reapply the behavior when the window's resize and orientationchange events are triggered, use: $(".myboxes").normalizeGridRows({ events: ['resize', 'orientationchange'] }); The default debounce interval is 250ms; specify a different interval with a 'delay' property in the options object.

The plugin works by iterating the collection (assumed to be in document order), and finding the contiguous elements that share the same top offset. Each set of such elements are sized to the height of the tallest in the set. The plugin works with or without a responsive framework like Bootstrap or Foundation, and has no dependencies other than jQuery itself.

Keywords

jquery-plugin

FAQs

Package last updated on 01 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts