maclinz / js_css_portfolioproject Goto Github PK
View Code? Open in Web Editor NEWHome Page: js-css-portfolio-project.vercel.app
Home Page: js-css-portfolio-project.vercel.app
Uncaught TypeError: Cannot read properties of undefined (reading 'className')
I spent an hour trying to change CSS and JS to be able to scroll through sections and also switch to them when clicked. If we scroll the page, sections should automatically switch; it's pretty frustrating the current way and impractical in my opinion.
HI guys. I have a problem that I cant navigate through pages with buttons.
I have checked my js file for thousand times and it still doesn't
work.
Also I receive <TypeError: allSections.addEventListener is not a function> this error.
I would appreciate if some one help.
` //sections active class
allSections.addEventListener('click' , (e) => {
const id=e.target.dataset.id;
if(id){
//remove selected from the other btns
sectBtns.foreach((btn) =>{
btn.classlist.remove('active');
})
e.target.classlist.add('active');
//hide other sections
sections.foreach((section)=>{
section.classlist.remove('active');
})
const element = document.getElementById(id);
element.classlist.add('active');
}
});
`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.