match height jquery
var matchHeight = function(classe, perLine) {
var peeps = $(String(classe)+":visible").css('height','auto').get();
var line = isNaN(perLine) ? peeps.length : parseInt(perLine);
for(var i = 0;i<peeps.length;i=i+line) {
var height = 0;
for(var x = i;x<(i+line);x++) {
if(peeps[x] && peeps[x].clientHeight > height) height = peeps[x].clientHeight;
}
for(var x = i;x<(i+line);x++) {
if(peeps[x]) peeps[x].style.height = String(height)+"px";
}
}
}
// matchHeight(".sameHeight", itemsPerLine) for per row matchHeight
// matchHeight(".sameHeight") to matchHeight across all elements
Also in JavaScript:
- fibonacci js code
- use bootstrap in react
- jquery loop
- javascript check if key exists in object
- what fungal activity increases greenhouse gases
- generate random number javascript
- variable defaults javascript es6
- react map gl marker offset
- placeholder text disappear when click in react
- styling element using jquery
- jquery modal on show + target button
- javascript in jsx
- how to find all permutations of an array with javascript
- discord.js send message to specific channel
- Module not found: Can't resolve '@date-io/date-fns' in 'C:\Users\61455\Documents\React apps\mya2o\src\pages'
- inmutabilidad javascript
- laravel fetch post
- react get data attribute from element
- These dependencies were not found: * webpack/lib/web/FetchCompileWasmPlugin in ./~/worker-loader/dist/index.js
- js navigate to another page
- javascript array remove first
- save or update mongoose
- js get last array element
- access django template variable in javascript