{"id":8645,"date":"2024-01-19T17:54:00","date_gmt":"2024-01-19T17:54:00","guid":{"rendered":"https:\/\/codehim.com\/?p=8645"},"modified":"2024-01-22T15:55:13","modified_gmt":"2024-01-22T10:55:13","slug":"javascript-faq-accordion-code-with-example","status":"publish","type":"post","link":"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/","title":{"rendered":"JavaScript FAQ Accordion Code with Example"},"content":{"rendered":"<p>This JavaScript accordion code snippet helps you to create an interactive FAQ section on a webpage. It allows users to smoothly <a href=\"https:\/\/codehim.com\/accordion\/accordion-expand-collapse-animation-css\/\" target=\"_blank\" rel=\"noopener\">expand and collapse<\/a> individual FAQ items by clicking on them. This code uses JavaScript to toggle the visibility of the FAQs answers when the corresponding question is clicked. It&#8217;s helpful for organizing and presenting frequently asked questions in a user-friendly manner.<\/p>\n<h2>How to Create JavaScript FAQ Accordion<\/h2>\n<p>1. Create the HTML structure for the FAQ accordion as follows. Inside the <code>&lt;div class=\"accordion\"&gt;<\/code> element, create individual FAQ items using the following code structure. Each FAQ item consists of a question and its corresponding answer. You can add more FAQ items as needed.<\/p>\n<pre class=\"prettyprint linenums lang-html\">&lt;h2&gt;FAQ'S&lt;\/h2&gt;\r\n\r\n&lt;div class=\"accordion\"&gt;\r\n  &lt;div class=\"accordion-item\"&gt;\r\n    &lt;div class=\"accordion-item-header\"&gt;\r\n      What is Web Development?\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"accordion-item-body\"&gt;\r\n      &lt;div class=\"accordion-item-body-content\"&gt;\r\n        Web Development broadly refers to the tasks associated with developing functional websites and applications for the Internet. The web development process includes web design, web content development, client-side\/server-side scripting and network security configuration, among other tasks.\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n  &lt;div class=\"accordion-item\"&gt;\r\n    &lt;div class=\"accordion-item-header\"&gt;\r\n      What is HTML?\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"accordion-item-body\"&gt;\r\n      &lt;div class=\"accordion-item-body-content\"&gt;\r\n        HTML, aka HyperText Markup Language, is the dominant markup language for creating websites and anything that can be viewed in a web browser.\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n  &lt;div class=\"accordion-item\"&gt;\r\n    &lt;div class=\"accordion-item-header\"&gt;\r\n      What are some basic technical skills of a Front-End developer?\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"accordion-item-body\"&gt;\r\n      &lt;div class=\"accordion-item-body-content\"&gt;\r\n        &lt;ul style=\"padding-left: 1rem;\"&gt;\r\n          &lt;li&gt;HTML, CSS, JavaScript&lt;\/li&gt;\r\n          &lt;li&gt;Frameworks (CSS and JavaScript frameworks)&lt;\/li&gt;\r\n          &lt;li&gt;Responsive Design&lt;\/li&gt;\r\n          &lt;li&gt;Version Control\/Git&lt;\/li&gt;\r\n          &lt;li&gt;Testing\/Debugging&lt;\/li&gt;\r\n          &lt;li&gt;Browser Developer Tools&lt;\/li&gt;\r\n          &lt;li&gt;Web Performance&lt;\/li&gt;\r\n          &lt;li&gt;SEO (Search Engine Optimization)&lt;\/li&gt;\r\n          &lt;!-- &lt;li&gt;CSS Preprocessing&lt;\/li&gt; --&gt;\r\n          &lt;li&gt;Command Line&lt;\/li&gt;\r\n          &lt;li&gt;CMS (Content Management System)&lt;\/li&gt;\r\n        &lt;\/ul&gt;\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n  &lt;div class=\"accordion-item\"&gt;\r\n    &lt;div class=\"accordion-item-header\"&gt;\r\n      What is HTTP?\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"accordion-item-body\"&gt;\r\n      &lt;div class=\"accordion-item-body-content\"&gt;\r\n        HTTP, aka HyperText Transfer Protocol, is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands.\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n  &lt;div class=\"accordion-item\"&gt;\r\n    &lt;div class=\"accordion-item-header\"&gt;\r\n      What is CORS?\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"accordion-item-body\"&gt;\r\n      &lt;div class=\"accordion-item-body-content\"&gt;\r\n        CORS, aka Cross-Origin Resource Sharing, is a mechanism that enables many resources (e.g. images, stylesheets, scripts, fonts) on a web page to be requested from another domain outside the domain from which the resource originated.\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>2. Style your FAQ accordion by creating a &#8220;styles.css&#8221; file and defining the CSS styles for elements. You can customize colors, fonts, and other visual aspects to match your website&#8217;s design.<\/p>\n<pre class=\"prettyprint linenums lang-css\">@import url(\"https:\/\/fonts.googleapis.com\/css?family=Montserrat\");\r\n\r\n* {\r\n  margin: 0;\r\n  padding: 0;\r\n  box-sizing: border-box;\r\n}\r\n\r\nbody {\r\n  font-family: \"Montserrat\", sans-serif;\r\n}\r\n.accordion {\r\n  width: 90%;\r\n  max-width: 1000px;\r\n  margin: 2rem auto;\r\n}\r\n.accordion-item {\r\n  background-color: #fff;\r\n  color: #111;\r\n  margin: 1rem 0;\r\n  border-radius: 0.5rem;\r\n  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.25);\r\n}\r\n.accordion-item-header {\r\n  padding: 0.5rem 3rem 0.5rem 1rem;\r\n  min-height: 3.5rem;\r\n  line-height: 1.25rem;\r\n  font-weight: bold;\r\n  display: flex;\r\n  align-items: center;\r\n  position: relative;\r\n  cursor: pointer;\r\n}\r\n.accordion-item-header::after {\r\n  content: \"+\";\r\n  font-size: 2rem;\r\n  position: absolute;\r\n  right: 1rem;\r\n}\r\n.accordion-item-header.active::after {\r\n  content: \"-\";\r\n}\r\n.accordion-item-body {\r\n  max-height: 0;\r\n  overflow: hidden;\r\n  transition: max-height 0.2s ease-out;\r\n}\r\n.accordion-item-body-content {\r\n  padding: 1rem;\r\n  line-height: 1.5rem;\r\n  border-top: 1px solid;\r\n  border-image: linear-gradient(to right, transparent, #34495e, transparent) 1;\r\n}\r\n\r\n@media (max-width: 767px) {\r\n  html {\r\n    font-size: 14px;\r\n  }\r\n}<\/pre>\n<p>3. Create a &#8220;script.js&#8221; file and add the following JavaScript code. This code will make the FAQ items expand and collapse when the user clicks on the question headers.<\/p>\n<pre class=\"prettyprint linenums lang-js\">const accordionItemHeaders = document.querySelectorAll(\r\n  \".accordion-item-header\"\r\n);\r\n\r\naccordionItemHeaders.forEach((accordionItemHeader) =&gt; {\r\n  accordionItemHeader.addEventListener(\"click\", (event) =&gt; {\r\n    \/\/ Uncomment in case you only want to allow for the display of only one collapsed item at a time!\r\n\r\n    const currentlyActiveAccordionItemHeader = document.querySelector(\r\n      \".accordion-item-header.active\"\r\n    );\r\n    if (\r\n      currentlyActiveAccordionItemHeader &amp;&amp;\r\n      currentlyActiveAccordionItemHeader !== accordionItemHeader\r\n    ) {\r\n      currentlyActiveAccordionItemHeader.classList.toggle(\"active\");\r\n      currentlyActiveAccordionItemHeader.nextElementSibling.style.maxHeight = 0;\r\n    }\r\n    accordionItemHeader.classList.toggle(\"active\");\r\n    const accordionItemBody = accordionItemHeader.nextElementSibling;\r\n    if (accordionItemHeader.classList.contains(\"active\")) {\r\n      accordionItemBody.style.maxHeight = accordionItemBody.scrollHeight + \"px\";\r\n    } else {\r\n      accordionItemBody.style.maxHeight = 0;\r\n    }\r\n  });\r\n});<\/pre>\n<p>Feel free to customize the FAQ items, styles, and add more questions and answers to fit your website&#8217;s needs. You can also integrate this accordion into an existing website by adapting the HTML and CSS to match your site&#8217;s design.<\/p>\n<p>You&#8217;ve successfully created an FAQ accordion for your website using HTML, CSS, and JavaScript. Users can now easily find answers to their frequently asked questions in an interactive and user-friendly format. If you have any questions or suggestions, feel free to comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This JavaScript accordion code snippet helps you to create an interactive FAQ section on a webpage. It allows users to&#8230;<\/p>\n","protected":false},"author":1,"featured_media":8657,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[61],"tags":[],"class_list":["post-8645","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-accordion"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JavaScript FAQ Accordion Code with Example &#8212; CodeHim<\/title>\n<meta name=\"description\" content=\"Here is a free JavaScript code snippet to create FAQ Accordion. You can view demo and download the source code.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript FAQ Accordion Code with Example &#8212; CodeHim\" \/>\n<meta property=\"og:description\" content=\"Here is a free JavaScript code snippet to create FAQ Accordion. You can view demo and download the source code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/\" \/>\n<meta property=\"og:site_name\" content=\"CodeHim\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codehimofficial\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-19T17:54:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-22T10:55:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/09\/JavaScript-FAQ-Accordion.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"960\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Asif Mughal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:site\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Asif Mughal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/\"},\"author\":{\"name\":\"Asif Mughal\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\"},\"headline\":\"JavaScript FAQ Accordion Code with Example\",\"datePublished\":\"2024-01-19T17:54:00+00:00\",\"dateModified\":\"2024-01-22T10:55:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/\"},\"wordCount\":263,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/09\/JavaScript-FAQ-Accordion.png\",\"articleSection\":[\"Accordion\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/\",\"url\":\"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/\",\"name\":\"JavaScript FAQ Accordion Code with Example &#8212; CodeHim\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/09\/JavaScript-FAQ-Accordion.png\",\"datePublished\":\"2024-01-19T17:54:00+00:00\",\"dateModified\":\"2024-01-22T10:55:13+00:00\",\"description\":\"Here is a free JavaScript code snippet to create FAQ Accordion. You can view demo and download the source code.\",\"breadcrumb\":{\"@id\":\"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/#primaryimage\",\"url\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/09\/JavaScript-FAQ-Accordion.png\",\"contentUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/09\/JavaScript-FAQ-Accordion.png\",\"width\":1280,\"height\":960,\"caption\":\"JavaScript FAQ Accordion\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/codehim.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Accordion\",\"item\":\"https:\/\/codehim.com\/category\/accordion\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"JavaScript FAQ Accordion Code with Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/codehim.com\/#website\",\"url\":\"https:\/\/codehim.com\/\",\"name\":\"CodeHim\",\"description\":\"Web Design Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"alternateName\":\"Web Design Codes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/codehim.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/codehim.com\/#organization\",\"name\":\"CodeHim - Web Design Code & Scripts\",\"url\":\"https:\/\/codehim.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"contentUrl\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"width\":280,\"height\":280,\"caption\":\"CodeHim - Web Design Code & Scripts\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/codehimofficial\",\"https:\/\/x.com\/CodeHimOfficial\",\"https:\/\/www.instagram.com\/codehim\/\",\"https:\/\/www.linkedin.com\/company\/codehim\",\"https:\/\/co.pinterest.com\/codehim\/\",\"https:\/\/www.youtube.com\/@codehim\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\",\"name\":\"Asif Mughal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"caption\":\"Asif Mughal\"},\"description\":\"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.\",\"sameAs\":[\"https:\/\/codehim.com\"],\"url\":\"https:\/\/codehim.com\/author\/asif-mughal\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JavaScript FAQ Accordion Code with Example &#8212; CodeHim","description":"Here is a free JavaScript code snippet to create FAQ Accordion. You can view demo and download the source code.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript FAQ Accordion Code with Example &#8212; CodeHim","og_description":"Here is a free JavaScript code snippet to create FAQ Accordion. You can view demo and download the source code.","og_url":"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/","og_site_name":"CodeHim","article_publisher":"https:\/\/www.facebook.com\/codehimofficial","article_published_time":"2024-01-19T17:54:00+00:00","article_modified_time":"2024-01-22T10:55:13+00:00","og_image":[{"width":1280,"height":960,"url":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/09\/JavaScript-FAQ-Accordion.png","type":"image\/png"}],"author":"Asif Mughal","twitter_card":"summary_large_image","twitter_creator":"@CodeHimOfficial","twitter_site":"@CodeHimOfficial","twitter_misc":{"Written by":"Asif Mughal","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/#article","isPartOf":{"@id":"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/"},"author":{"name":"Asif Mughal","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed"},"headline":"JavaScript FAQ Accordion Code with Example","datePublished":"2024-01-19T17:54:00+00:00","dateModified":"2024-01-22T10:55:13+00:00","mainEntityOfPage":{"@id":"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/"},"wordCount":263,"commentCount":0,"publisher":{"@id":"https:\/\/codehim.com\/#organization"},"image":{"@id":"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/09\/JavaScript-FAQ-Accordion.png","articleSection":["Accordion"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/","url":"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/","name":"JavaScript FAQ Accordion Code with Example &#8212; CodeHim","isPartOf":{"@id":"https:\/\/codehim.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/#primaryimage"},"image":{"@id":"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/09\/JavaScript-FAQ-Accordion.png","datePublished":"2024-01-19T17:54:00+00:00","dateModified":"2024-01-22T10:55:13+00:00","description":"Here is a free JavaScript code snippet to create FAQ Accordion. You can view demo and download the source code.","breadcrumb":{"@id":"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/#primaryimage","url":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/09\/JavaScript-FAQ-Accordion.png","contentUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/09\/JavaScript-FAQ-Accordion.png","width":1280,"height":960,"caption":"JavaScript FAQ Accordion"},{"@type":"BreadcrumbList","@id":"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codehim.com\/"},{"@type":"ListItem","position":2,"name":"Accordion","item":"https:\/\/codehim.com\/category\/accordion\/"},{"@type":"ListItem","position":3,"name":"JavaScript FAQ Accordion Code with Example"}]},{"@type":"WebSite","@id":"https:\/\/codehim.com\/#website","url":"https:\/\/codehim.com\/","name":"CodeHim","description":"Web Design Code Snippets","publisher":{"@id":"https:\/\/codehim.com\/#organization"},"alternateName":"Web Design Codes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codehim.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codehim.com\/#organization","name":"CodeHim - Web Design Code & Scripts","url":"https:\/\/codehim.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/","url":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","contentUrl":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","width":280,"height":280,"caption":"CodeHim - Web Design Code & Scripts"},"image":{"@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codehimofficial","https:\/\/x.com\/CodeHimOfficial","https:\/\/www.instagram.com\/codehim\/","https:\/\/www.linkedin.com\/company\/codehim","https:\/\/co.pinterest.com\/codehim\/","https:\/\/www.youtube.com\/@codehim"]},{"@type":"Person","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed","name":"Asif Mughal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","caption":"Asif Mughal"},"description":"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.","sameAs":["https:\/\/codehim.com"],"url":"https:\/\/codehim.com\/author\/asif-mughal\/"}]}},"views":3596,"_links":{"self":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/8645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/comments?post=8645"}],"version-history":[{"count":0,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/8645\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media\/8657"}],"wp:attachment":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media?parent=8645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/categories?post=8645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/tags?post=8645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}