{"id":787,"date":"2014-08-25T19:17:07","date_gmt":"2014-08-25T17:17:07","guid":{"rendered":"http:\/\/www.robinglauser.ch\/blog\/?p=787"},"modified":"2014-08-25T19:17:07","modified_gmt":"2014-08-25T17:17:07","slug":"how-to-unbind-event-handlers-with-jquery","status":"publish","type":"post","link":"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/","title":{"rendered":"How to unbind event handlers with jQuery"},"content":{"rendered":"<p>In this really short tutorial I will show you how to unbind event handlers from a event in jQuery.<\/p>\n<p>Let&#8217;s say we have a event handler called <strong>handleEvent<\/strong> and bound\u00a0this to the click event of a button with the id <strong>clickme<\/strong>.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nvar handleEvent = function() {\r\n alert( &quot;You've clicked me!&quot; );\r\n};\r\n$( &quot;#clickme&quot; ).bind( &quot;click&quot;, handleEvent );\r\n<\/pre>\n<p>If we now want to unbind this handler from the event we can use the jQuery unbind function.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n$( &quot;#clickme&quot; ).unbind( &quot;click&quot;, handleEvent );\r\n<\/pre>\n<p>And that&#8217;s it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">In this really short tutorial I will show you how to unbind event handlers from a event in jQuery. Let&#8217;s say we have a event handler called handleEvent and bound\u00a0this to the click event of a button with the id clickme. var handleEvent = function() { alert( &quot;You&#8217;ve clicked me!&quot; ); }; $( &quot;#clickme&quot; ).bind( &quot;click&quot;, handleEvent ); If we &#8230; <a class=\"read-more\" href=\"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-787","post","type-post","status-publish","format-standard","hentry","category-fresh"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to unbind event handlers with jQuery - Robin Glauser<\/title>\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.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to unbind event handlers with jQuery - Robin Glauser\" \/>\n<meta property=\"og:description\" content=\"In this really short tutorial I will show you how to unbind event handlers from a event in jQuery. Let&#8217;s say we have a event handler called handleEvent and bound\u00a0this to the click event of a button with the id clickme. var handleEvent = function() { alert( &quot;You&#039;ve clicked me!&quot; ); }; $( &quot;#clickme&quot; ).bind( &quot;click&quot;, handleEvent ); If we ... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/\" \/>\n<meta property=\"og:site_name\" content=\"Robin Glauser\" \/>\n<meta property=\"article:published_time\" content=\"2014-08-25T17:17:07+00:00\" \/>\n<meta name=\"author\" content=\"Robin Glauser\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@robinglauser\" \/>\n<meta name=\"twitter:site\" content=\"@robinglauser\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Robin Glauser\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/\"},\"author\":{\"name\":\"Robin Glauser\",\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19\"},\"headline\":\"How to unbind event handlers with jQuery\",\"datePublished\":\"2014-08-25T17:17:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/\"},\"wordCount\":106,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19\"},\"articleSection\":[\"Fresh\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/\",\"url\":\"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/\",\"name\":\"How to unbind event handlers with jQuery - Robin Glauser\",\"isPartOf\":{\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/#website\"},\"datePublished\":\"2014-08-25T17:17:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.robinglauser.ch\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to unbind event handlers with jQuery\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/#website\",\"url\":\"https:\/\/www.robinglauser.ch\/blog\/\",\"name\":\"Robin Glauser\",\"description\":\"My Blog about Development, Design and my random thoughts.\",\"publisher\":{\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.robinglauser.ch\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19\",\"name\":\"Robin Glauser\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg\",\"url\":\"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg\",\"contentUrl\":\"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg\",\"width\":800,\"height\":530,\"caption\":\"Robin Glauser\"},\"logo\":{\"@id\":\"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg\"},\"description\":\"I'm a web developer.\",\"sameAs\":[\"https:\/\/www.robinglauser.ch\",\"https:\/\/www.instagram.com\/robinglauser\/\",\"https:\/\/x.com\/robinglauser\"],\"url\":\"https:\/\/www.robinglauser.ch\/blog\/author\/robin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to unbind event handlers with jQuery - Robin Glauser","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.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/","og_locale":"en_US","og_type":"article","og_title":"How to unbind event handlers with jQuery - Robin Glauser","og_description":"In this really short tutorial I will show you how to unbind event handlers from a event in jQuery. Let&#8217;s say we have a event handler called handleEvent and bound\u00a0this to the click event of a button with the id clickme. var handleEvent = function() { alert( &quot;You've clicked me!&quot; ); }; $( &quot;#clickme&quot; ).bind( &quot;click&quot;, handleEvent ); If we ... Read More","og_url":"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/","og_site_name":"Robin Glauser","article_published_time":"2014-08-25T17:17:07+00:00","author":"Robin Glauser","twitter_card":"summary_large_image","twitter_creator":"@robinglauser","twitter_site":"@robinglauser","twitter_misc":{"Written by":"Robin Glauser"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/#article","isPartOf":{"@id":"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/"},"author":{"name":"Robin Glauser","@id":"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19"},"headline":"How to unbind event handlers with jQuery","datePublished":"2014-08-25T17:17:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/"},"wordCount":106,"commentCount":0,"publisher":{"@id":"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19"},"articleSection":["Fresh"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/","url":"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/","name":"How to unbind event handlers with jQuery - Robin Glauser","isPartOf":{"@id":"https:\/\/www.robinglauser.ch\/blog\/#website"},"datePublished":"2014-08-25T17:17:07+00:00","breadcrumb":{"@id":"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.robinglauser.ch\/blog\/2014\/08\/25\/how-to-unbind-event-handlers-with-jquery\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.robinglauser.ch\/blog\/"},{"@type":"ListItem","position":2,"name":"How to unbind event handlers with jQuery"}]},{"@type":"WebSite","@id":"https:\/\/www.robinglauser.ch\/blog\/#website","url":"https:\/\/www.robinglauser.ch\/blog\/","name":"Robin Glauser","description":"My Blog about Development, Design and my random thoughts.","publisher":{"@id":"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.robinglauser.ch\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.robinglauser.ch\/blog\/#\/schema\/person\/e1a94504a6ff5171fa13670932514b19","name":"Robin Glauser","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg","url":"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg","contentUrl":"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg","width":800,"height":530,"caption":"Robin Glauser"},"logo":{"@id":"https:\/\/www.robinglauser.ch\/blog\/wp-content\/uploads\/2015\/10\/DSC_1244_small.jpg"},"description":"I'm a web developer.","sameAs":["https:\/\/www.robinglauser.ch","https:\/\/www.instagram.com\/robinglauser\/","https:\/\/x.com\/robinglauser"],"url":"https:\/\/www.robinglauser.ch\/blog\/author\/robin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/posts\/787","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/comments?post=787"}],"version-history":[{"count":3,"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/posts\/787\/revisions"}],"predecessor-version":[{"id":790,"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/posts\/787\/revisions\/790"}],"wp:attachment":[{"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/media?parent=787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/categories?post=787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.robinglauser.ch\/blog\/wp-json\/wp\/v2\/tags?post=787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}