{"id":9866,"date":"2024-01-12T18:09:00","date_gmt":"2024-01-12T18:09:00","guid":{"rendered":"https:\/\/codehim.com\/?p=9866"},"modified":"2024-01-22T16:12:48","modified_gmt":"2024-01-22T11:12:48","slug":"javascript-toggle-class-multiple-elements","status":"publish","type":"post","link":"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/","title":{"rendered":"JavaScript Toggle Class Multiple Elements"},"content":{"rendered":"<p>This JavaScript code enables the toggling of an &#8220;active&#8221; class among multiple elements. The code defines a function to toggle the class and attaches it to specific HTML elements. When clicked, these elements dynamically switch their active state, enhancing user interaction. This code is helpful for managing and visually highlighting selected elements within a group.<\/p>\n<p>This code is beneficial for interactive web interfaces, allowing users to toggle the &#8220;active&#8221; class on multiple elements.<\/p>\n<h2>How to Create Javascript Toggle Class Multiple Elements<\/h2>\n<p>2. Begin by creating the HTML structure with elements you want to toggle. Each element should have a unique ID and share a common parent, as shown in the following code.<\/p>\n<pre class=\"prettyprint linenums lang-html\">&lt;div id=\"hold\"&gt;\r\n  &lt;div class=\"box\" id=\"one\"&gt;&lt;\/div&gt;\r\n  &lt;div class=\"box\" id=\"two\"&gt;&lt;\/div&gt;\r\n  &lt;div class=\"box\" id=\"three\"&gt;&lt;\/div&gt;\r\n&lt;\/div&gt;<\/pre>\n<p>2. Style your elements and parent container using the included CSS code. Customize the design to fit your project&#8217;s needs.<\/p>\n<pre class=\"prettyprint linenums lang-css\">html {\r\n  background: rgb(34, 34, 34);\r\n  user-select: none;\r\n  -moz-user-select: none;\r\n}\r\nh2 {\r\n  font-family: 'Luckiest Guy', cursive;\r\n  color: rgb(120, 196, 201);\r\n  text-align: center;\r\n  font-size: 64px;\r\n  margin-top: 50px;\r\n}\r\n.box {\r\n  width: 100px;\r\n  height: 100px;\r\n  cursor: pointer;\r\n}\r\n\r\n.box:hover {\r\n  opacity: 0.6;\r\n}\r\n\r\n.active {\r\n  border-radius: 100%;\r\n}\r\n\r\n#hold {\r\n  width: 325px;\r\n  height: 100px;\r\n  margin: 50px auto;\r\n  color: rgb(237, 94, 59);\r\n  text-align: center;\r\n  font-family: impact;\r\n  font-size: 24px;\r\n}\r\n\r\n#hold &gt; div {\r\n  display: inline-block;\r\n  margin-right: 3px;\r\n}\r\n\r\n#one {\r\n  background: rgb(237, 94, 59);\r\n  width: 100px;\r\n  height: 100px;\r\n}\r\n\r\n#two {\r\n  background: rgb(87, 154, 166);\r\n  width: 100px;\r\n  height: 100px;\r\n}\r\n\r\n#three {\r\n  background: rgb(168, 168, 168);\r\n  width: 100px;\r\n  height: 100px;\r\n}<\/pre>\n<p>3. Finally, add the provided JavaScript code to your project. This code utilizes vanilla JavaScript to toggle the &#8220;active&#8221; class on click, creating a dynamic and interactive experience.<\/p>\n<pre class=\"prettyprint linenums lang-js\">\/\/vanilla js -- toggle active class \r\n\/\/ el = object containing the elements to toggle active class and the parent element \r\nvar el = {\r\n  one: document.getElementById('one'),\r\n  two: document.getElementById('two'),\r\n  three: document.getElementById('three'),\r\n  hold: document.getElementById('hold')\r\n};\r\n\/\/ func = object containing the logic \r\nvar func = {\r\n  toggleActive: function(ele) {\r\n    ele = event.target;\r\n    var hold = el.hold.children,\r\n        huh = el.hold.children.length,\r\n        hasActive = ele.classList.contains('active');\r\n    for (i = 0; i &lt; huh; i++) {\r\n      if (hold[i].classList.contains('active')) {\r\n        hold[i].classList.remove('active');\r\n      }\r\n    }\r\n    if (!hasActive) {\r\n      ele.classList.add('active');\r\n    }\r\n  }\r\n};\r\n\r\n\/\/add listeners when the window loads \r\nwindow.onload = function() {\r\n  el.one.addEventListener(\"click\", func.toggleActive);\r\n  el.two.addEventListener(\"click\", func.toggleActive);\r\n  el.three.addEventListener(\"click\", func.toggleActive);\r\n};<\/pre>\n<p>Modify the JavaScript code according to your project&#8217;s needs. You can easily integrate this functionality into various projects such as <a href=\"https:\/\/codehim.com\/category\/gallery\/\" target=\"_blank\" rel=\"noopener\">image galleries<\/a>, <a href=\"https:\/\/codehim.com\/category\/menu\/\" target=\"_blank\" rel=\"noopener\">menu systems<\/a>, or any scenario where selecting and highlighting elements is required.<\/p>\n<p>That&#8217;s all! hopefully, you have successfully created functionality in JavaScript to toggle a class for multiple elements on a webpage. If you have any questions or suggestions, feel free to comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This JavaScript code enables the toggling of an &#8220;active&#8221; class among multiple elements. The code defines a function to toggle&#8230;<\/p>\n","protected":false},"author":1,"featured_media":9878,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[116],"tags":[],"class_list":["post-9866","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vanilla-javascript"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JavaScript Toggle Class Multiple Elements &#8212; CodeHim<\/title>\n<meta name=\"description\" content=\"Here is a free code snippet to create a JavaScript Toggle Class Multiple Elements. 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\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript Toggle Class Multiple Elements &#8212; CodeHim\" \/>\n<meta property=\"og:description\" content=\"Here is a free code snippet to create a JavaScript Toggle Class Multiple Elements. You can view demo and download the source code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/\" \/>\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-12T18:09:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-22T11:12:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Toggle-Class-Multiple-Elements.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=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/\"},\"author\":{\"name\":\"Asif Mughal\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\"},\"headline\":\"JavaScript Toggle Class Multiple Elements\",\"datePublished\":\"2024-01-12T18:09:00+00:00\",\"dateModified\":\"2024-01-22T11:12:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/\"},\"wordCount\":231,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Toggle-Class-Multiple-Elements.png\",\"articleSection\":[\"Vanilla JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/\",\"url\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/\",\"name\":\"JavaScript Toggle Class Multiple Elements &#8212; CodeHim\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Toggle-Class-Multiple-Elements.png\",\"datePublished\":\"2024-01-12T18:09:00+00:00\",\"dateModified\":\"2024-01-22T11:12:48+00:00\",\"description\":\"Here is a free code snippet to create a JavaScript Toggle Class Multiple Elements. You can view demo and download the source code.\",\"breadcrumb\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/#primaryimage\",\"url\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Toggle-Class-Multiple-Elements.png\",\"contentUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Toggle-Class-Multiple-Elements.png\",\"width\":1280,\"height\":960,\"caption\":\"JavaScript Toggle Class Multiple Elements\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/codehim.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Vanilla JavaScript\",\"item\":\"https:\/\/codehim.com\/category\/vanilla-javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"JavaScript Toggle Class Multiple Elements\"}]},{\"@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 Toggle Class Multiple Elements &#8212; CodeHim","description":"Here is a free code snippet to create a JavaScript Toggle Class Multiple Elements. 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\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript Toggle Class Multiple Elements &#8212; CodeHim","og_description":"Here is a free code snippet to create a JavaScript Toggle Class Multiple Elements. You can view demo and download the source code.","og_url":"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/","og_site_name":"CodeHim","article_publisher":"https:\/\/www.facebook.com\/codehimofficial","article_published_time":"2024-01-12T18:09:00+00:00","article_modified_time":"2024-01-22T11:12:48+00:00","og_image":[{"width":1280,"height":960,"url":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Toggle-Class-Multiple-Elements.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":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/#article","isPartOf":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/"},"author":{"name":"Asif Mughal","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed"},"headline":"JavaScript Toggle Class Multiple Elements","datePublished":"2024-01-12T18:09:00+00:00","dateModified":"2024-01-22T11:12:48+00:00","mainEntityOfPage":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/"},"wordCount":231,"commentCount":0,"publisher":{"@id":"https:\/\/codehim.com\/#organization"},"image":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Toggle-Class-Multiple-Elements.png","articleSection":["Vanilla JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/","url":"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/","name":"JavaScript Toggle Class Multiple Elements &#8212; CodeHim","isPartOf":{"@id":"https:\/\/codehim.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/#primaryimage"},"image":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Toggle-Class-Multiple-Elements.png","datePublished":"2024-01-12T18:09:00+00:00","dateModified":"2024-01-22T11:12:48+00:00","description":"Here is a free code snippet to create a JavaScript Toggle Class Multiple Elements. You can view demo and download the source code.","breadcrumb":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/#primaryimage","url":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Toggle-Class-Multiple-Elements.png","contentUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Toggle-Class-Multiple-Elements.png","width":1280,"height":960,"caption":"JavaScript Toggle Class Multiple Elements"},{"@type":"BreadcrumbList","@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-toggle-class-multiple-elements\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codehim.com\/"},{"@type":"ListItem","position":2,"name":"Vanilla JavaScript","item":"https:\/\/codehim.com\/category\/vanilla-javascript\/"},{"@type":"ListItem","position":3,"name":"JavaScript Toggle Class Multiple Elements"}]},{"@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":1044,"_links":{"self":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/9866","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=9866"}],"version-history":[{"count":0,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/9866\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media\/9878"}],"wp:attachment":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media?parent=9866"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/categories?post=9866"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/tags?post=9866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}