{"id":2995,"date":"2014-03-13T09:01:34","date_gmt":"2014-03-13T09:01:34","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/13\/jquery-mobile-object-object-object-has-no-method-jqmdata-collection-of-common-programming-errors\/"},"modified":"2014-03-13T09:01:34","modified_gmt":"2014-03-13T09:01:34","slug":"jquery-mobile-object-object-object-has-no-method-jqmdata-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/13\/jquery-mobile-object-object-object-has-no-method-jqmdata-collection-of-common-programming-errors\/","title":{"rendered":"jquery mobile: Object [object Object] has no method &#39;jqmData&#39;-Collection of common programming errors"},"content":{"rendered":"<p>I am relatively new to Jquery and Jquery mobile, I was just trying and tutorial to add Loading animation on the page, I was simply following the code provided in one of the demos. However I am getting the following error.<\/p>\n<pre><code>Uncaught TypeError: Object [object Object] has no method 'jqmData' \n<\/code><\/pre>\n<p>I am using the following code snippet and javascript<\/p>\n<pre><code>Refresh\n\n\nwindow.$ = window.jQuery = WLJQ;\n$( document ).on( \"click\", \".show-page-loading-msg\", function() {\nvar $this = $( this ),\n    theme = $this.jqmData( \"theme\" ) || $.mobile.loader.prototype.options.theme,\n    msgText = $this.jqmData( \"msgtext\" ) || $.mobile.loader.prototype.options.text,\n    textVisible = $this.jqmData( \"textvisible\" ) || $.mobile.loader.prototype.options.textVisible,\n    textonly = !!$this.jqmData( \"textonly\" );\n    html = $this.jqmData( \"html\" ) || \"\";\n$.mobile.loading( \"show\", {\n        text: msgText,\n        textVisible: textVisible,\n        theme: theme,\n        textonly: textonly,\n        html: html\n});\n\nsetTimeout(WL.Client.reloadApp, 5000);\n$.mobile.loading( \"hide\" );\n});\n\n\n<\/code><\/pre>\n<p>The error is pointing to this line in the javascript <code>theme = $this.jqmData( \"theme\" )<\/code><br \/>\nwhen i debugged on browser console i was able to see the button data values assigned to the $this variable Please advice,<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am relatively new to Jquery and Jquery mobile, I was just trying and tutorial to add Loading animation on the page, I was simply following the code provided in one of the demos. However I am getting the following error. Uncaught TypeError: Object [object Object] has no method &#8216;jqmData&#8217; I am using the following [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2995","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2995","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2995"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2995\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}