Fix adjust skill cards handling
This commit is contained in:
parent
b57d2bcf52
commit
54cbb86f68
1 changed files with 11 additions and 8 deletions
|
@ -91,15 +91,18 @@ var projectCards;
|
||||||
function adjustSkillCardsHeight() {
|
function adjustSkillCardsHeight() {
|
||||||
if (!isMobile) { // no need to adjust height for mobile devices
|
if (!isMobile) { // no need to adjust height for mobile devices
|
||||||
// primary skills
|
// primary skills
|
||||||
var el = document.getElementById("primary-skills").children;
|
var skillCards = document.getElementById("primary-skills");
|
||||||
var maxHeight = 0;
|
if (skillCards != null) {
|
||||||
for (let i = 0; i < el.length; i++) {
|
var el = skillCards.children;
|
||||||
if (el[i].children[0].clientHeight > maxHeight) {
|
var maxHeight = 0;
|
||||||
maxHeight = el[i].children[0].clientHeight;
|
for (let i = 0; i < el.length; i++) {
|
||||||
|
if (el[i].children[0].clientHeight > maxHeight) {
|
||||||
|
maxHeight = el[i].children[0].clientHeight;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (let i = 0; i < el.length; i++) {
|
||||||
|
el[i].children[0].setAttribute("style", "min-height: " + maxHeight + "px;")
|
||||||
}
|
}
|
||||||
}
|
|
||||||
for (let i = 0; i < el.length; i++) {
|
|
||||||
el[i].children[0].setAttribute("style", "min-height: " + maxHeight + "px;")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue