{"id":9870,"date":"2024-01-12T18:09:00","date_gmt":"2024-01-12T18:09:00","guid":{"rendered":"https:\/\/codehim.com\/?p=9870"},"modified":"2024-01-22T16:12:52","modified_gmt":"2024-01-22T11:12:52","slug":"expand-and-collapse-div-using-javascript","status":"publish","type":"post","link":"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/","title":{"rendered":"Expand and Collapse div using JavaScript"},"content":{"rendered":"<p>This simple JavaScript snippet helps you to expand and collapse div element on a webpage. It calculates and animates the height of the content div, providing a smooth visual transition.<\/p>\n<p>Whether you are working on the <a href=\"https:\/\/codehim.com\/accordion\/javascript-faq-accordion-code-with-example\/\" target=\"_blank\" rel=\"noopener\">accordion project<\/a> or want to create multiple expandable\/collapsible sections, this code quite fits your needs. With the help of this script, you can create interactive and space-efficient content displays on your website.<\/p>\n<h2>How to Expand and Collapse Div Using JavaScript<\/h2>\n<p>1. First of all, load the <a href=\"https:\/\/necolas.github.io\/normalize.css\/\" target=\"_blank\" rel=\"noopener\">Normalize CSS<\/a> and <a href=\"https:\/\/github.com\/LeaVerou\/prefixfree\" target=\"_blank\" rel=\"noopener\">prefixfree JS<\/a> by adding the following CDN links into the head tag of your HTML document. (Optional)<\/p>\n<pre class=\"prettyprint linenums lang-html\">&lt;link rel=\"stylesheet\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/normalize\/5.0.0\/normalize.min.css\"&gt;\r\n&lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/prefixfree\/1.0.7\/prefixfree.min.js\"&gt;&lt;\/script&gt;<\/pre>\n<p>2. Create the HTML structure for expandable div elements as follows:<\/p>\n<pre class=\"prettyprint linenums lang-html\">&lt;ul&gt;\r\n  &lt;li&gt;\r\n    &lt;a href=\"#\" class=\"expand\"&gt;click&lt;\/a&gt;\r\n    &lt;div class=\"content\"&gt;\r\n&lt;p&gt;Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Placeat accusamus sequi eum commodi sint consequatur magni magnam non culpa laborum aperiam voluptatem velit dolore cupiditate tempore. Quibusdam unde voluptas eveniet. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Exercitationem laudantium laboriosam distinctio numquam corrupti eius eum inventore voluptas. Saepe temporibus nemo nobis deserunt ipsa id at mollitia magnam iusto eos?&lt;\/p&gt;  \r\n    &lt;\/div&gt;\r\n  &lt;\/li&gt;\r\n  \r\n    &lt;li&gt;\r\n    &lt;a href=\"#\" class=\"expand\"&gt;click&lt;\/a&gt;\r\n    &lt;div class=\"content\"&gt;\r\n&lt;p&gt;Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Placeat accu&lt;\/p&gt;  \r\n    &lt;\/div&gt;\r\n  &lt;\/li&gt;\r\n&lt;\/ul&gt;<\/pre>\n<p>3. Now, include the necessary CSS to style your expandable sections. The following code includes basic styling for the main container, content div, and the link. Customize the div element according to your needs.<\/p>\n<pre class=\"prettyprint linenums lang-css\">.content {\r\n  width: 0;\r\n  height: 0;\r\n  overflow: hidden;\r\n  transition: height ease 0.5s;\r\n}\r\n\r\n.is-visible + .content {\r\n  width: auto;\r\n}\r\n\r\nul {\r\n  list-style: none;\r\n}\r\nul a {\r\n  text-transform: uppercase;\r\n  text-decoration: none;\r\n}<\/pre>\n<p>4. The JavaScript code handles the expansion and collapse functionality. Copy the following code and include it in your HTML file, preferably at the end of the <code>&lt;body&gt;<\/code> tag.<\/p>\n<pre class=\"prettyprint linenums lang-js\">var expand = document.querySelectorAll( '.expand' ),\r\n    expandCount = expand.length,\r\n    content = null,\r\n    parent = null,\r\n    parentWidth = 0;\r\n\r\nfor (var i = 0; i &lt; expandCount; i++) {\r\n  expand[i].onclick = function(e) {\r\n    e.preventDefault();\r\n    \r\n    parent = this.parentNode;\r\n    parentWidth = parent.offsetWidth;\r\n\r\n    content = parent.querySelectorAll( '.content' )[0];\r\n    \r\n    \/\/ Calculate width of element to animate height\r\n    var newHeight = getHeight( content, parent );\r\n   \r\n    content.style.height = newHeight + \"px\";\r\n    \r\n    if( !hasClass(this, 'is-visible') ) {\r\n      addClass( this, 'is-visible' );\r\n    } else {\r\n      removeClass( this, 'is-visible' );\r\n      content.style.height = \"0px\";\r\n    }\r\n  };\r\n} \r\n\r\nfunction removeClass(elem, className) {\r\n    var newClass = ' ' + elem.className.replace( \/[\\t\\r\\n]\/g, ' ') + ' ';\r\n    if (hasClass(elem, className)) {\r\n        while (newClass.indexOf(' ' + className + ' ') &gt;= 0 ) {\r\n            newClass = newClass.replace(' ' + className + ' ', ' ');\r\n        }\r\n        elem.className = newClass.replace(\/^\\s+|\\s+$\/g, '');\r\n    }\r\n}\r\n\r\nfunction addClass(elem, className) {\r\n    if (!hasClass(elem, className)) {\r\n        elem.className += ' ' + className;\r\n    }\r\n}\r\n\r\nfunction hasClass(elem, className) {\r\n    return new RegExp(' ' + className + ' ').test(' ' + elem.className + ' ');\r\n}\r\n\r\nfunction getHeight( el, parent ) {\r\n  var newEl = document.createElement('p'),\r\n      height = 0;\r\n  newEl.innerHTML = el.innerHTML;\r\n  newEl.setAttribute('id', 'test-height');\r\n  \r\n  parent.appendChild( newEl );\r\n  \r\n  height = document.getElementById( 'test-height' ).offsetHeight;\r\n  \r\n  parent.removeChild( document.getElementById('test-height') );\r\n  return height;\r\n}<\/pre>\n<p>That&#8217;s all! hopefully, you have successfully created an expandable div element on your website. If you have any questions or suggestions, feel free to comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This simple JavaScript snippet helps you to expand and collapse div element on a webpage. It calculates and animates the&#8230;<\/p>\n","protected":false},"author":1,"featured_media":9886,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[116],"tags":[],"class_list":["post-9870","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>Expand and Collapse div using JavaScript &#8212; CodeHim<\/title>\n<meta name=\"description\" content=\"Here is a free code snippet to create a Expand and Collapse div using JavaScript. 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\/expand-and-collapse-div-using-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Expand and Collapse div using JavaScript &#8212; CodeHim\" \/>\n<meta property=\"og:description\" content=\"Here is a free code snippet to create a Expand and Collapse div using JavaScript. You can view demo and download the source code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/\" \/>\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:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/Expand-and-Collapse-div-using-JavaScript.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\/expand-and-collapse-div-using-javascript\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/\"},\"author\":{\"name\":\"Asif Mughal\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\"},\"headline\":\"Expand and Collapse div using JavaScript\",\"datePublished\":\"2024-01-12T18:09:00+00:00\",\"dateModified\":\"2024-01-22T11:12:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/\"},\"wordCount\":205,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/Expand-and-Collapse-div-using-JavaScript.png\",\"articleSection\":[\"Vanilla JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/\",\"url\":\"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/\",\"name\":\"Expand and Collapse div using JavaScript &#8212; CodeHim\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/Expand-and-Collapse-div-using-JavaScript.png\",\"datePublished\":\"2024-01-12T18:09:00+00:00\",\"dateModified\":\"2024-01-22T11:12:52+00:00\",\"description\":\"Here is a free code snippet to create a Expand and Collapse div using JavaScript. You can view demo and download the source code.\",\"breadcrumb\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/#primaryimage\",\"url\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/Expand-and-Collapse-div-using-JavaScript.png\",\"contentUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/Expand-and-Collapse-div-using-JavaScript.png\",\"width\":1280,\"height\":960,\"caption\":\"Expand and Collapse div using JavaScript\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/#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\":\"Expand and Collapse div using JavaScript\"}]},{\"@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":"Expand and Collapse div using JavaScript &#8212; CodeHim","description":"Here is a free code snippet to create a Expand and Collapse div using JavaScript. 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\/expand-and-collapse-div-using-javascript\/","og_locale":"en_US","og_type":"article","og_title":"Expand and Collapse div using JavaScript &#8212; CodeHim","og_description":"Here is a free code snippet to create a Expand and Collapse div using JavaScript. You can view demo and download the source code.","og_url":"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/","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:52+00:00","og_image":[{"width":1280,"height":960,"url":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/Expand-and-Collapse-div-using-JavaScript.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\/expand-and-collapse-div-using-javascript\/#article","isPartOf":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/"},"author":{"name":"Asif Mughal","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed"},"headline":"Expand and Collapse div using JavaScript","datePublished":"2024-01-12T18:09:00+00:00","dateModified":"2024-01-22T11:12:52+00:00","mainEntityOfPage":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/"},"wordCount":205,"commentCount":0,"publisher":{"@id":"https:\/\/codehim.com\/#organization"},"image":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/Expand-and-Collapse-div-using-JavaScript.png","articleSection":["Vanilla JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/","url":"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/","name":"Expand and Collapse div using JavaScript &#8212; CodeHim","isPartOf":{"@id":"https:\/\/codehim.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/#primaryimage"},"image":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/Expand-and-Collapse-div-using-JavaScript.png","datePublished":"2024-01-12T18:09:00+00:00","dateModified":"2024-01-22T11:12:52+00:00","description":"Here is a free code snippet to create a Expand and Collapse div using JavaScript. You can view demo and download the source code.","breadcrumb":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/#primaryimage","url":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/Expand-and-Collapse-div-using-JavaScript.png","contentUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/Expand-and-Collapse-div-using-JavaScript.png","width":1280,"height":960,"caption":"Expand and Collapse div using JavaScript"},{"@type":"BreadcrumbList","@id":"https:\/\/codehim.com\/vanilla-javascript\/expand-and-collapse-div-using-javascript\/#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":"Expand and Collapse div using JavaScript"}]},{"@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":1704,"_links":{"self":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/9870","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=9870"}],"version-history":[{"count":0,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/9870\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media\/9886"}],"wp:attachment":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media?parent=9870"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/categories?post=9870"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/tags?post=9870"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}