{"id":11533,"date":"2024-03-23T13:14:58","date_gmt":"2024-03-23T08:14:58","guid":{"rendered":"https:\/\/codehim.com\/?p=11533"},"modified":"2024-03-23T13:14:58","modified_gmt":"2024-03-23T08:14:58","slug":"elastic-custom-cursor-in-vanilla-javascript","status":"publish","type":"post","link":"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/","title":{"rendered":"Elastic Custom Cursor in Vanilla JavaScript"},"content":{"rendered":"<p>This code creates an elastic custom cursor in vanilla JavaScript. It follows mouse movements smoothly. It helps enhance user experience on websites.<\/p>\n<p>You can use this code on your website to create a visually appealing and interactive cursor. It adds a unique touch to your site, making it more engaging for visitors. Additionally, it improves user experience by providing smooth and dynamic cursor movements.<\/p>\n<h2>How to Create Elastic Custom Cursor in Vanilla JavaScript<\/h2>\n<p>1. Start by creating a basic HTML structure. For this tutorial, you only need a single <code>&lt;div&gt;<\/code> element with a class of &#8220;circle&#8221; to represent the cursor.<\/p>\n<pre class=\"prettyprint linenums lang-html\">&lt;div class=\"circle\"&gt;&lt;\/div&gt;<\/pre>\n<p>2. Define the appearance and behavior of the cursor using CSS. The provided CSS ensures the cursor is circular and positioned correctly.<\/p>\n<pre class=\"prettyprint linenums lang-css\">* {\r\n  box-sizing: border-box;\r\n  padding: 0;\r\n  margin: 0;\r\n}\r\n\r\nbody{\r\n  min-height: 100lvh;\r\n  background-color: #050908;\r\n}\r\n\r\n.circle {\r\n  --circle-size: 40px;\r\n  position: fixed;\r\n  height: var(--circle-size);\r\n  width: var(--circle-size);\r\n  border: 1px solid white;\r\n  border-radius: 100%;\r\n  top: calc(var(--circle-size) \/ 2 * -1);\r\n  left: calc(var(--circle-size) \/ 2 * -1);\r\n  pointer-events: none;\r\n}<\/pre>\n<p>3. Now, let&#8217;s make the cursor dynamic with JavaScript. This script tracks mouse movements and applies transformations to the cursor for smooth animation.<\/p>\n<pre class=\"prettyprint linenums lang-js\">\/**\r\n * YouTube Tutorial:\r\n * https:\/\/youtu.be\/wG_5453Vq98\r\n *\/\r\n\r\nconsole.clear();\r\n\r\n\/\/ Select the circle element\r\nconst circleElement = document.querySelector('.circle');\r\n\r\n\/\/ Create objects to track mouse position and custom cursor position\r\nconst mouse = { x: 0, y: 0 }; \/\/ Track current mouse position\r\nconst previousMouse = { x: 0, y: 0 } \/\/ Store the previous mouse position\r\nconst circle = { x: 0, y: 0 }; \/\/ Track the circle position\r\n\r\n\/\/ Initialize variables to track scaling and rotation\r\nlet currentScale = 0; \/\/ Track current scale value\r\nlet currentAngle = 0; \/\/ Track current angle value\r\n\r\n\/\/ Update mouse position on the 'mousemove' event\r\nwindow.addEventListener('mousemove', (e) =&gt; {\r\n  mouse.x = e.x;\r\n  mouse.y = e.y;\r\n});\r\n\r\n\/\/ Smoothing factor for cursor movement speed (0 = smoother, 1 = instant)\r\nconst speed = 0.17;\r\n\r\n\/\/ Start animation\r\nconst tick = () =&gt; {\r\n  \/\/ MOVE\r\n  \/\/ Calculate circle movement based on mouse position and smoothing\r\n  circle.x += (mouse.x - circle.x) * speed;\r\n  circle.y += (mouse.y - circle.y) * speed;\r\n  \/\/ Create a transformation string for cursor translation\r\n  const translateTransform = `translate(${circle.x}px, ${circle.y}px)`;\r\n\r\n  \/\/ SQUEEZE\r\n  \/\/ 1. Calculate the change in mouse position (deltaMouse)\r\n  const deltaMouseX = mouse.x - previousMouse.x;\r\n  const deltaMouseY = mouse.y - previousMouse.y;\r\n  \/\/ Update previous mouse position for the next frame\r\n  previousMouse.x = mouse.x;\r\n  previousMouse.y = mouse.y;\r\n  \/\/ 2. Calculate mouse velocity using Pythagorean theorem and adjust speed\r\n  const mouseVelocity = Math.min(Math.sqrt(deltaMouseX**2 + deltaMouseY**2) * 4, 150); \r\n  \/\/ 3. Convert mouse velocity to a value in the range [0, 0.5]\r\n  const scaleValue = (mouseVelocity \/ 150) * 0.5;\r\n  \/\/ 4. Smoothly update the current scale\r\n  currentScale += (scaleValue - currentScale) * speed;\r\n  \/\/ 5. Create a transformation string for scaling\r\n  const scaleTransform = `scale(${1 + currentScale}, ${1 - currentScale})`;\r\n\r\n  \/\/ ROTATE\r\n  \/\/ 1. Calculate the angle using the atan2 function\r\n  const angle = Math.atan2(deltaMouseY, deltaMouseX) * 180 \/ Math.PI;\r\n  \/\/ 2. Check for a threshold to reduce shakiness at low mouse velocity\r\n  if (mouseVelocity &gt; 20) {\r\n    currentAngle = angle;\r\n  }\r\n  \/\/ 3. Create a transformation string for rotation\r\n  const rotateTransform = `rotate(${currentAngle}deg)`;\r\n\r\n  \/\/ Apply all transformations to the circle element in a specific order: translate -&gt; rotate -&gt; scale\r\n  circleElement.style.transform = `${translateTransform} ${rotateTransform} ${scaleTransform}`;\r\n\r\n  \/\/ Request the next frame to continue the animation\r\n  window.requestAnimationFrame(tick);\r\n}\r\n\r\n\/\/ Start the animation loop\r\ntick();<\/pre>\n<p>Finally, integrate the JavaScript code into your HTML file, and you&#8217;re ready to go! Feel free to further customize the cursor&#8217;s behavior and appearance to suit your website&#8217;s design and requirements.<\/p>\n<p>That&#8217;s it! You&#8217;ve successfully created an elastic <a href=\"https:\/\/codehim.com\/vanilla-javascript\/javascript-custom-cursor-with-javascript-custom-cursor-with-icon-and-text\/\" target=\"_blank\" rel=\"noopener\">custom cursor<\/a> on your website. Experiment with different properties and add your creative touch to enhance user interaction on your website.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This code creates an elastic custom cursor in vanilla JavaScript. It follows mouse movements smoothly. It helps enhance user experience&#8230;<\/p>\n","protected":false},"author":1,"featured_media":11545,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[116],"tags":[],"class_list":["post-11533","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>Elastic Custom Cursor in Vanilla JavaScript &#8212; CodeHim<\/title>\n<meta name=\"description\" content=\"Here is a free code snippet to create a Elastic Custom Cursor in Vanilla 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\/elastic-custom-cursor-in-vanilla-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Elastic Custom Cursor in Vanilla JavaScript &#8212; CodeHim\" \/>\n<meta property=\"og:description\" content=\"Here is a free code snippet to create a Elastic Custom Cursor in Vanilla JavaScript. You can view demo and download the source code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-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-03-23T08:14:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codehim.com\/wp-content\/uploads\/2024\/03\/Elastic-Custom-Cursor-in-Vanilla-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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/\"},\"author\":{\"name\":\"Asif Mughal\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\"},\"headline\":\"Elastic Custom Cursor in Vanilla JavaScript\",\"datePublished\":\"2024-03-23T08:14:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/\"},\"wordCount\":212,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2024\/03\/Elastic-Custom-Cursor-in-Vanilla-JavaScript.png\",\"articleSection\":[\"Vanilla JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/\",\"url\":\"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/\",\"name\":\"Elastic Custom Cursor in Vanilla JavaScript &#8212; CodeHim\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2024\/03\/Elastic-Custom-Cursor-in-Vanilla-JavaScript.png\",\"datePublished\":\"2024-03-23T08:14:58+00:00\",\"description\":\"Here is a free code snippet to create a Elastic Custom Cursor in Vanilla JavaScript. You can view demo and download the source code.\",\"breadcrumb\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/#primaryimage\",\"url\":\"https:\/\/codehim.com\/wp-content\/uploads\/2024\/03\/Elastic-Custom-Cursor-in-Vanilla-JavaScript.png\",\"contentUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2024\/03\/Elastic-Custom-Cursor-in-Vanilla-JavaScript.png\",\"width\":1280,\"height\":960,\"caption\":\"Elastic Custom Cursor in Vanilla JavaScript\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-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\":\"Elastic Custom Cursor in Vanilla 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":"Elastic Custom Cursor in Vanilla JavaScript &#8212; CodeHim","description":"Here is a free code snippet to create a Elastic Custom Cursor in Vanilla 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\/elastic-custom-cursor-in-vanilla-javascript\/","og_locale":"en_US","og_type":"article","og_title":"Elastic Custom Cursor in Vanilla JavaScript &#8212; CodeHim","og_description":"Here is a free code snippet to create a Elastic Custom Cursor in Vanilla JavaScript. You can view demo and download the source code.","og_url":"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/","og_site_name":"CodeHim","article_publisher":"https:\/\/www.facebook.com\/codehimofficial","article_published_time":"2024-03-23T08:14:58+00:00","og_image":[{"width":1280,"height":960,"url":"https:\/\/codehim.com\/wp-content\/uploads\/2024\/03\/Elastic-Custom-Cursor-in-Vanilla-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":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/#article","isPartOf":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/"},"author":{"name":"Asif Mughal","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed"},"headline":"Elastic Custom Cursor in Vanilla JavaScript","datePublished":"2024-03-23T08:14:58+00:00","mainEntityOfPage":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/"},"wordCount":212,"commentCount":0,"publisher":{"@id":"https:\/\/codehim.com\/#organization"},"image":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2024\/03\/Elastic-Custom-Cursor-in-Vanilla-JavaScript.png","articleSection":["Vanilla JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/","url":"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/","name":"Elastic Custom Cursor in Vanilla JavaScript &#8212; CodeHim","isPartOf":{"@id":"https:\/\/codehim.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/#primaryimage"},"image":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2024\/03\/Elastic-Custom-Cursor-in-Vanilla-JavaScript.png","datePublished":"2024-03-23T08:14:58+00:00","description":"Here is a free code snippet to create a Elastic Custom Cursor in Vanilla JavaScript. You can view demo and download the source code.","breadcrumb":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-javascript\/#primaryimage","url":"https:\/\/codehim.com\/wp-content\/uploads\/2024\/03\/Elastic-Custom-Cursor-in-Vanilla-JavaScript.png","contentUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2024\/03\/Elastic-Custom-Cursor-in-Vanilla-JavaScript.png","width":1280,"height":960,"caption":"Elastic Custom Cursor in Vanilla JavaScript"},{"@type":"BreadcrumbList","@id":"https:\/\/codehim.com\/vanilla-javascript\/elastic-custom-cursor-in-vanilla-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":"Elastic Custom Cursor in Vanilla 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":1225,"_links":{"self":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/11533","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=11533"}],"version-history":[{"count":3,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/11533\/revisions"}],"predecessor-version":[{"id":11568,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/11533\/revisions\/11568"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media\/11545"}],"wp:attachment":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media?parent=11533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/categories?post=11533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/tags?post=11533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}