記事の情報についてはjavascript アコーディオンについて説明します。 javascript アコーディオンについて学んでいる場合は、Mississippi Literacy Associationこの記事Create an Accordion Menu in 15 minutes with JavaScriptでjavascript アコーディオンについて学びましょう。
目次
Create an Accordion Menu in 15 minutes with JavaScriptのjavascript アコーディオンに関連するコンテンツの概要最も正確
このmsliteracy.org Webサイトでは、javascript アコーディオン以外の他の情報を追加して、より有用なデータを自分で提供できます。 ウェブサイトMississippiLiteracyAssociationで、私たちはいつもあなたのために毎日新しい正確な情報を更新します、 あなたに最高の価値を提供したいという願望を持って。 ユーザーが最も正確な方法でインターネットに思考を追加できるのを支援する。
トピックに関連するいくつかの情報javascript アコーディオン
このプロジェクトでは、JavaScript を使用してアコーディオン メニューを 15 分で作成します。 これを Vue.js(Vue 3) で作成します。 Discord サーバーに参加します。 Twitter: FB グループに参加します。 Google Font:
javascript アコーディオンの内容に関連する写真

読んでいるCreate an Accordion Menu in 15 minutes with JavaScriptのコンテンツを追跡することに加えて、Mississippi Literacy Associationを継続的に公開する他の記事を見つけることができます。
javascript アコーディオンに関連するいくつかの提案
#Create #Accordion #Menu #minutes #JavaScript。
accordion menu,Create an Accordion Menu in 15 minutes with JavaScript,accordion menu javascrip,javascript,html,css,javascript accordion,accordion menu html css,how to create a accordion,how to create a accordion menu in html,how to create a accordion menu,css accordion menu。
Create an Accordion Menu in 15 minutes with JavaScript。
javascript アコーディオン。
javascript アコーディオンの内容により、msliteracy.orgが提供することを願っています。。 msliteracy.orgのjavascript アコーディオンの内容を見てくれてありがとう。
Amazing video; Every other accordion tutorial just made a box appear under the accordion. You on the other hand, expanded the accordion box which is what I wanted!
<body>
<div class="accordion">
<div class="accordion-item">
<h2 class="accordion-title"> This is a testing question</h2>
<p class = "accordion-answer">
bruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruh
</p>
</div>
<div class="accordion-item">
<h2 class="accordion-title"> This is a testing question</h2>
<p class = "accordion-answer">
bruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruh
</p>
</div>
<div class="accordion-item">
<h2 class="accordion-title"> This is a testing question</h2>
<p class = "accordion-answer">
bruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruhbruh
</p>
</div>
</div>
<script src="script.js"></script>
</body>
HTML
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Raleway", sans-serif;
font-weight: 400;
}
body {
background-color: #082d52;
}
.accordion {
max-width: 1200px;
margin: 0 auto;
padding: 50px;
}
.accordion-item {
border-radius: 10px;
padding: 20px;
margin-bottom: 20px;
background-color: white;
}
.accordion-title {
display: flex;
align-items: center;
cursor: pointer;
}
.accordion-title::after {
content: "+";
font-size: 40px;
margin-left: auto;
}
.active-header::after {
content: "-";
}
.accordion-answer {
max-height: 0;
overflow: hidden;
transition: 1000ms ease max-height;
CSS
const accordionTitles = document.querySelectorAll(".accordion-title");
accordionTitles.forEach((accordionTitle) => {
accordionTitle.addEventListener("click", () => {
const height = accordionTitle.nextElementSibling.scrollHeight;
console.log(height);
accordionTitle.classList.toggle("active-header");
if (accordionTitle.classList.contains("active-header")) {
accordionTitle.nextElementSibling.style.maxHeight = `${height}px`;
} else {
accordionTitle.nextElementSibling.style.maxHeight = "0px";
}
});
});
JavaScript
This is the perfect solution I've been looking for… Thank you so much for this video!
You are a lifesaver. Subscribed.
Is it just me or is the font extremely small in this video? Seems like the content is good, but I can barely see the code.
man.. your way of explaining is so good. u should make more videos like this!
very great tutorial.. waiting for more javaScript projects.
Hey, cool video! As a beginner I find your content quite helpful!
I did everyting you showed step by step. HTML and CSS went smoothly. However, I couldn't make js worked. My code was:
const accordionTitles= document.querySelectorAll(".accordion-title");
accordionTitles.forEach((accordionTitle) => {
accordionTitle.addEventlistener("click", () => {
const height = accordionTitle.nextElementSibling.scrollHeight;
console.log(height);
accordionTitle.classList.toggle("active-header");
if(accordionTitle.classlist.contains("active-header")){
accordionTitle.nextElementSibling.style.maxHeight = '${height}px';
} else {
accordionTitle.nextElementSibling.style.maxHeight = "0px";
}
});
});
It did not work. What was the mistake? And, is there any programme for debugging js codes? Thanks in advance!
This is what I call a perfect simple explanation in 15 minutes. Awesome video John! Subscribed.
Hi John, Great video and really explained. Any tips on how we could extend this slightly to only allow one accordion item to be open at a time?
Спасибо )
This tutorial is awesome. You explained everything really clearly, and the code is great as well. Not too much, just enough. Love it