Skip to content

Commit

Permalink
Added some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
arpitmisraw authored Jan 31, 2018
1 parent 4373c01 commit 53256bd
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,10 @@ var projects = document.querySelectorAll(".projects li");
var pen = document.querySelectorAll(".project-links p");
var links = document.querySelectorAll(".links");



for(var i = 0; i < projects.length; i++)
{
projects[i].addEventListener("click", select);
}

for(var k = 0; k < pen.length; k++)
{
pen[k].setAttribute("data-height", "400");
pen[k].setAttribute("data-default-tab", "result");
}

function select()
{
this.classList.add("selected");
window.scroll({ top: 0, left: 0, behavior: 'smooth' });
window.scroll({ top: 0, left: 0, behavior: "smooth" });
for(var j = 0; j < projects.length; j++)
{
if(projects[j] != this)
Expand All @@ -27,6 +14,23 @@ function select()
links[j].style.display = "none";
}
else
{
links[j].style.display = "block";
}
}
}



for(var i = 0; i < projects.length; i++)
{
projects[i].addEventListener("click", select);
}

for(var k = 0; k < pen.length; k++)
{
pen[k].setAttribute("data-height", "400");
pen[k].setAttribute("data-default-tab", "result");
}


0 comments on commit 53256bd

Please sign in to comment.