{"id":11030,"date":"2016-02-23T16:15:07","date_gmt":"2016-02-23T14:15:07","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=11030"},"modified":"2017-12-21T15:33:38","modified_gmt":"2017-12-21T13:33:38","slug":"jquery-enabledisable-example","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/","title":{"rendered":"jQuery Enable\/Disable Example"},"content":{"rendered":"<p>The aim of this example is to show you how to enable\/disable the html elements by using jQuery. In some cases, we need to enable or disable a HTML element. This will help us to allow\/prevent the user from doing some actions. <\/p>\n<p>jQuery provides very simple code to enable\/disable any HTML element. The following code is used respectively for this purpose. <\/p>\n<pre class=\"brush:bash\">.prop('disabled', false);\r\n.prop('disabled', true);<\/pre>\n<p>Let\u2019s look at some examples. To download the jQuery library, click <a target=\"_blank\" href=\"https:\/\/jquery.com\/download\/\">here<\/a>.<br \/>\n[ulp id=&#8217;qGGDqWnle19VavkM&#8217;]<\/p>\n<h2>1. HTML<\/h2>\n<p>First of all you need to create a simple html document.<\/p>\n<p><span style=\"text-decoration: underline\"><em>jQueryEnableDisableExample.html<\/em><\/span><\/p>\n<pre class=\"brush:xml; highlight:[5]\">\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n\t&lt;title&gt;jQuery Enable\/Disable Example&lt;\/title&gt;\r\n\t&lt;script src=\"jquery-2.1.4.min.js\"&gt;&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<h2>2. jQuery Enable\/Disable Examples<\/h2>\n<h3>2.1 Enable\/Disable Submit Button<\/h3>\n<p>Let\u2019s add the following simple html code.<\/p>\n<pre class=\"brush:xml\">\r\nFirst Name: &lt;input type=\"text\" id=\"firstName\"\/&gt;&lt;br\/&gt;\r\n&lt;input  type=\"submit\" id=\"submitButton\" value=\"submit\"\/&gt;\r\n<\/pre>\n<p>As you can notice in the following javascript code, Setting disabled property to true will disable the HTML element.In the other side, Setting it to false will enable the HTML element. <\/p>\n<pre class=\"brush:js;highlight:[3,7,9]\">\r\n&lt;script type=\"text\/javascript\"&gt;\r\n$(document).ready(function() {\r\n\t $('input[type=\"submit\"]').prop('disabled', true);\r\n\t \r\n\t $( \"#firstName\" ).keyup(function() {\r\n\t\t\tif(this.value!=''){\r\n\t\t\t\t$('input[type=\"submit\"]').prop('disabled', false);\r\n\t\t\t}else{\r\n\t\t\t\t$('input[type=\"submit\"]').prop('disabled', true);\r\n\t\t\t}\r\n\t })\r\n});\r\n&lt;\/script&gt;\r\n<\/pre>\n<p>The result in the browser would be:<\/p>\n<figure id=\"attachment_11076\" aria-describedby=\"caption-attachment-11076\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/02\/jQuery_Enable_Disable_Example1.gif\" rel=\"attachment wp-att-11076\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/02\/jQuery_Enable_Disable_Example1.gif\" alt=\"Enable\/Disable Submit Button\" width=\"800\" height=\"300\" class=\"size-full wp-image-11076\" \/><\/a><figcaption id=\"caption-attachment-11076\" class=\"wp-caption-text\">Enable\/Disable Submit Button<\/figcaption><\/figure>\n<h3>2.2 Enable\/Disable Form Input Fields<\/h3>\n<p>Let\u2019s add the following simple html code.<\/p>\n<pre class=\"brush:xml\">\r\nFirst Name:&lt;br\/&gt;&lt;input type=\"text\" id=\"firstName\"\/&gt;&lt;br\/&gt;&lt;br\/&gt;\r\nLast Name:&lt;br\/&gt;&lt;input type=\"text\" id=\"lastName\" \/&gt;&lt;br\/&gt;&lt;br\/&gt;\r\nAge:&lt;br\/&gt;&lt;input type=\"text\" id=\"age\" \/&gt;&lt;br\/&gt;&lt;br\/&gt;\r\n&lt;input  type=\"submit\" id=\"submitButton\" value=\"submit\"\/&gt;\r\n<\/pre>\n<p>The following simple code is used for enabling\/disabling the html elements. <\/p>\n<pre class=\"brush:js;highlight:[3,4,5,13,15,19,21,25,27]\">\r\n&lt;script type=\"text\/javascript\"&gt;\r\n$(document).ready(function() {\r\n     $('input[type=\"submit\"]').prop('disabled', true);\r\n     $('#lastName').prop('disabled', true); \r\n     $('#age').prop('disabled', true);\r\n\t \r\n     $( \"#firstName,#lastName,#age\" ).keyup(function() {\r\n\t\t\tvar firstName = $( \"#firstName\" ).val();\r\n\t\t\tvar lastName = $( \"#lastName\" ).val();\r\n\t\t\tvar age = $( \"#age\" ).val();\r\n\t\t\t\r\n\t\t\tif(firstName!=''){\r\n\t\t\t\t$('#lastName').prop('disabled', false);\r\n\t\t\t}else{\r\n\t\t\t\t$('#lastName').prop('disabled', true);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(firstName!='' &amp;&amp; lastName!=''){\r\n\t\t\t\t$('#age').prop('disabled', false);\r\n\t\t\t}else{\r\n\t\t\t\t$('#age').prop('disabled', true);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(firstName!='' &amp;&amp; lastName!='' &amp;&amp; age!=''){\r\n\t\t\t\t$('input[type=\"submit\"]').prop('disabled', false);\r\n\t\t\t}else{\r\n\t\t\t\t$('input[type=\"submit\"]').prop('disabled', true);\r\n\t\t\t}\r\n\t })\r\n});\r\n&lt;\/script&gt;\r\n<\/pre>\n<p>The result in the browser would be:<\/p>\n<figure id=\"attachment_11077\" aria-describedby=\"caption-attachment-11077\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/02\/jQuery_Enable_Disable_Example2.gif\" rel=\"attachment wp-att-11077\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/02\/jQuery_Enable_Disable_Example2.gif\" alt=\"Enable\/Disable Form Input Fields\" width=\"800\" height=\"300\" class=\"size-full wp-image-11077\" \/><\/a><figcaption id=\"caption-attachment-11077\" class=\"wp-caption-text\">Enable\/Disable Form Input Fields<\/figcaption><\/figure>\n<h3>2.3 Toggling Enabled\/Disabled on an element<\/h3>\n<p>Let\u2019s add the following simple html code.<\/p>\n<pre class=\"brush:xml\">\r\nFirst Name: &lt;input type=\"text\" id=\"firstName\" disabled=\"disabled\" \/&gt;&lt;br\/&gt;&lt;br\/&gt;\r\n&lt;a href=\"javascript:return 0;\" onclick=\"toggleEnableDisable()\"&gt;Enable\/Disable&lt;\/a&gt;\r\n<\/pre>\n<p>To check if an element is enabled or disabled, we can use <code>.is(':disabled')<\/code> jQuery method. This method returns true if the element is disabled otherwise returns false.<\/p>\n<pre class=\"brush:js;highlight:[3,4,5,13,15,19,21,25,27]\">\r\n&lt;script type=\"text\/javascript\"&gt;\r\nfunction toggleEnableDisable() {\r\n     if($('#firstName').is(':disabled')){\r\n\t\t$('#firstName').css(\"border\",\"1px solid #0e0e0e\");\r\n\t\t$('#firstName').prop(\"disabled\",false);\r\n\t }else if($('#firstName').is(':enabled')){\r\n\t\t$('#firstName').css(\"border\",\"\");\r\n\t\t$('#firstName').prop(\"disabled\",true);\r\n\t }\r\n}\r\n&lt;\/script&gt;\r\n<\/pre>\n<p>The result in the browser would be:<\/p>\n<figure id=\"attachment_11078\" aria-describedby=\"caption-attachment-11078\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/02\/jQuery_Enable_Disable_Example3.gif\" rel=\"attachment wp-att-11078\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/02\/jQuery_Enable_Disable_Example3.gif\" alt=\"Toggling Enabled\/Disabled on an element\" width=\"800\" height=\"300\" class=\"size-full wp-image-11078\" \/><\/a><figcaption id=\"caption-attachment-11078\" class=\"wp-caption-text\">Toggling Enabled\/Disabled on an element<\/figcaption><\/figure>\n<h2>3. Conclusion<\/h2>\n<p>jQuery provides very easy way to enable\/disable any HTML element. By using a single line code like <code>.prop('disabled', status);<\/code>, the HTML elements can be enabled or disabled according to the second parameter. If the second parameter of this method is true, the element will be disabled otherwise it will be enabled. <\/p>\n<h2>4. Download<\/h2>\n<p>This was an example about jQuery Enable\/Disable.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/02\/jquery-enable-disable-example.zip\"><strong>jQuery Enable\/Disable Example<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The aim of this example is to show you how to enable\/disable the html elements by using jQuery. In some cases, we need to enable or disable a HTML element. This will help us to allow\/prevent the user from doing some actions. jQuery provides very simple code to enable\/disable any HTML element. The following code &hellip;<\/p>\n","protected":false},"author":106,"featured_media":919,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-11030","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jquery"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>jQuery Enable\/Disable Example - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"The aim of this example is to show you how to enable\/disable the html elements by using jQuery. In some cases, we need to enable or disable a HTML\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"jQuery Enable\/Disable Example - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"The aim of this example is to show you how to enable\/disable the html elements by using jQuery. In some cases, we need to enable or disable a HTML\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2016-02-23T14:15:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-21T13:33:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Saeb Najim\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Saeb Najim\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/\"},\"author\":{\"name\":\"Saeb Najim\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/7554117e1066be33eda4c81bac192cc9\"},\"headline\":\"jQuery Enable\/Disable Example\",\"datePublished\":\"2016-02-23T14:15:07+00:00\",\"dateModified\":\"2017-12-21T13:33:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/\"},\"wordCount\":345,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"articleSection\":[\"jQuery\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/\",\"name\":\"jQuery Enable\/Disable Example - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"datePublished\":\"2016-02-23T14:15:07+00:00\",\"dateModified\":\"2017-12-21T13:33:38+00:00\",\"description\":\"The aim of this example is to show you how to enable\/disable the html elements by using jQuery. In some cases, we need to enable or disable a HTML\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"jQuery\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/jquery\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"jQuery Enable\/Disable Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/7554117e1066be33eda4c81bac192cc9\",\"name\":\"Saeb Najim\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1a6884eb32867720ef22a2a7728235120963a9a750d54d0356d5e3619ad3cd06?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1a6884eb32867720ef22a2a7728235120963a9a750d54d0356d5e3619ad3cd06?s=96&d=mm&r=g\",\"caption\":\"Saeb Najim\"},\"description\":\"Saeb has graduated from the University of Technology. During the last ten years (since 2005) he has been involved with a large number of projects about programming, software engineering, design and analysis . He works as a senior Software Engineer in the e-commerce and web development sector where he is mainly responsible for projects based on Java, Java frameworks, design patterns and Big Data technologies.\",\"sameAs\":[\"http:\/\/www.webcodegeeks.com\/\",\"https:\/\/www.linkedin.com\/in\/saebnajim\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/saeb-najim\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"jQuery Enable\/Disable Example - Web Code Geeks - 2026","description":"The aim of this example is to show you how to enable\/disable the html elements by using jQuery. In some cases, we need to enable or disable a HTML","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:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/","og_locale":"en_US","og_type":"article","og_title":"jQuery Enable\/Disable Example - Web Code Geeks - 2026","og_description":"The aim of this example is to show you how to enable\/disable the html elements by using jQuery. In some cases, we need to enable or disable a HTML","og_url":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2016-02-23T14:15:07+00:00","article_modified_time":"2017-12-21T13:33:38+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","type":"image\/jpeg"}],"author":"Saeb Najim","twitter_card":"summary_large_image","twitter_creator":"@webcodegeeks","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Saeb Najim","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/"},"author":{"name":"Saeb Najim","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/7554117e1066be33eda4c81bac192cc9"},"headline":"jQuery Enable\/Disable Example","datePublished":"2016-02-23T14:15:07+00:00","dateModified":"2017-12-21T13:33:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/"},"wordCount":345,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","articleSection":["jQuery"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/","url":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/","name":"jQuery Enable\/Disable Example - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","datePublished":"2016-02-23T14:15:07+00:00","dateModified":"2017-12-21T13:33:38+00:00","description":"The aim of this example is to show you how to enable\/disable the html elements by using jQuery. In some cases, we need to enable or disable a HTML","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-enabledisable-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/"},{"@type":"ListItem","position":3,"name":"jQuery","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/jquery\/"},{"@type":"ListItem","position":4,"name":"jQuery Enable\/Disable Example"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/7554117e1066be33eda4c81bac192cc9","name":"Saeb Najim","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1a6884eb32867720ef22a2a7728235120963a9a750d54d0356d5e3619ad3cd06?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1a6884eb32867720ef22a2a7728235120963a9a750d54d0356d5e3619ad3cd06?s=96&d=mm&r=g","caption":"Saeb Najim"},"description":"Saeb has graduated from the University of Technology. During the last ten years (since 2005) he has been involved with a large number of projects about programming, software engineering, design and analysis . He works as a senior Software Engineer in the e-commerce and web development sector where he is mainly responsible for projects based on Java, Java frameworks, design patterns and Big Data technologies.","sameAs":["http:\/\/www.webcodegeeks.com\/","https:\/\/www.linkedin.com\/in\/saebnajim"],"url":"https:\/\/www.webcodegeeks.com\/author\/saeb-najim\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/11030","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/106"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=11030"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/11030\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/919"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=11030"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=11030"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=11030"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}