fix home.js
This commit is contained in:
parent
54cbb86f68
commit
29bea9e8b3
1 changed files with 12 additions and 5 deletions
|
@ -110,15 +110,19 @@ var projectCards;
|
|||
|
||||
// ================== Project cards =====================
|
||||
// Add click action on project category selector buttons
|
||||
var btns = document.getElementById("project-filter-buttons").children;
|
||||
var filterButtons = document.getElementById("project-filter-buttons");
|
||||
if (filterButtons != null) {
|
||||
var btns = filterButtons.children;
|
||||
|
||||
for (let i = 0; i < btns.length; i++) {
|
||||
btns[i].onclick = function () {
|
||||
showGithubStars(btns[i].id);
|
||||
for (let i = 0; i < btns.length; i++) {
|
||||
btns[i].onclick = function () {
|
||||
showGithubStars(btns[i].id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (document.getElementById("project-card-holder").children.length != 0) {
|
||||
var projectCardHolder = document.getElementById("project-card-holder");
|
||||
if (projectCardHolder != null && projectCardHolder.children.length != 0) {
|
||||
projectCards = $(".filtr-projects").filterizr({ layout: 'sameWidth' });
|
||||
}
|
||||
|
||||
|
@ -282,6 +286,9 @@ var projectCards;
|
|||
function showAchievements() {
|
||||
// show achievements from achievements-holder div
|
||||
let gallery = document.getElementById("gallery");
|
||||
if (gallery == null) {
|
||||
return
|
||||
}
|
||||
gallery.innerHTML = "";
|
||||
const entries = document.getElementById("achievements-holder").children;
|
||||
let len = entries.length;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue