{"id":535,"date":"2011-07-21T13:34:22","date_gmt":"2011-07-21T10:34:22","guid":{"rendered":"https:\/\/polyetilen.lt\/?p=535"},"modified":"2023-05-02T10:57:28","modified_gmt":"2023-05-02T07:57:28","slug":"check-if-event-exists-on-element","status":"publish","type":"post","link":"https:\/\/polyetilen.lt\/en\/check-if-event-exists-on-element","title":{"rendered":"Check if event exists on element"},"content":{"rendered":"<p>To check whether the event exists on element is possible with jQuery function date(). For example there is a form and if I need to bind an event submit() but before check submit event exists on element.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nif(!$('#form').data('events.submit')){\r\n\t$(&quot;#form&quot;).submit(function(){\r\n\t\t\/\/do submit action\r\n\t\treturn false;\r\n\t});\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>To check whether the event exists on element is possible with jQuery function date(). For example there is a form and if I need to bind an event submit() but before check submit event exists &hellip; <a href=\"https:\/\/polyetilen.lt\/en\/check-if-event-exists-on-element\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_US","_original_post":"http:\/\/polyetilen.lt\/?p=219","footnotes":""},"categories":[8],"tags":[75,53,74,76],"class_list":["post-535","post","type-post","status-publish","format-standard","hentry","category-programavimas","tag-data","tag-jquery","tag-submit","tag-veiksmas","en-US"],"_links":{"self":[{"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/posts\/535","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/comments?post=535"}],"version-history":[{"count":1,"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/posts\/535\/revisions"}],"predecessor-version":[{"id":536,"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/posts\/535\/revisions\/536"}],"wp:attachment":[{"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/media?parent=535"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/categories?post=535"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/polyetilen.lt\/wp-json\/wp\/v2\/tags?post=535"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}