Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dotsunited-equal-height-blocks

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dotsunited-equal-height-blocks - npm Package Compare versions

Comparing version 3.0.1 to 3.1.0

82

lib/fallback.js

@@ -1,47 +0,57 @@

var $ = require('jquery');
(function(window, factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], function($) {
return factory(window, $);
});
} else if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = factory(window, require('jquery'));
} else {
window.dotsunitedEqualHeightBlocks = factory(window, window.jQuery || window.Zepto);
}
}(typeof window !== 'undefined' ? window : this, function(window, $) {
return function(containerSelector, itemSelector) {
function reload() {
var list = $(this), items = list.find(itemSelector);
module.exports = function(containerSelector, itemSelector) {
function reload() {
var list = $(this), items = list.find(itemSelector);
items.css('height', 'auto');
items.css('height', 'auto');
var perRow = Math.floor(list.width() / items.width());
var perRow = Math.floor(list.width() / items.width());
if (perRow < 2) {
return;
}
if (perRow < 2) {
return;
}
for (var i = 0, j = items.length; i < j; i += perRow) {
var maxHeight = 0, row = items.slice(i, i + perRow);
for (var i = 0, j = items.length; i < j; i += perRow) {
var maxHeight = 0, row = items.slice(i, i + perRow);
row.each(function() {
var itemHeight = parseFloat($(this).outerHeight());
row.each(function() {
var itemHeight = parseFloat($(this).outerHeight());
if (itemHeight > maxHeight) {
maxHeight = itemHeight;
}
});
if (itemHeight > maxHeight) {
maxHeight = itemHeight;
}
});
row.css('height', maxHeight);
row.css('height', maxHeight);
}
}
}
$(function() {
var list = $(containerSelector)
.on('reload', reload)
.trigger('reload')
.find('img')
.on('load', function() {
$(this)
.closest(containerSelector)
.trigger('reload')
;
})
;
$(function() {
var list = $(containerSelector)
.on('reload', reload)
.trigger('reload')
.find('img')
.on('load', function() {
$(this)
.closest(containerSelector)
.trigger('reload')
;
})
;
$(window).on('resize', function() {
list.trigger('reload');
$(window).on('resize', function() {
list.trigger('reload');
});
});
});
};
};
}));

@@ -7,5 +7,6 @@ {

"name": "Jan Sorgalla",
"url": "jan.sorgalla@dotsunited.de"
"email": "jan.sorgalla@dotsunited.de",
"url" : "https://dotsunited.de"
},
"version": "3.0.1",
"version": "3.1.0",
"repository": {

@@ -12,0 +13,0 @@ "type": "git",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc