{"id":12269844,"date":"2019-12-25T21:18:58","date_gmt":"2019-12-25T21:18:58","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/problem-witch-load\/"},"modified":"2019-12-25T21:20:13","modified_gmt":"2019-12-25T21:20:13","slug":"problem-witch-load","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/problem-witch-load\/","title":{"rendered":"Problem witch load()"},"content":{"rendered":"<p>Hi. I try use jQuery function load() to refresh page with wavesurfer plugin and if I call function the I get error :<\/p>\n<p><code>Uncaught TypeError: Cannot read property &#039;name&#039; of undefined<\/code><\/p>\n<pre><code>$j(document).on(&#039;ready ajaxComplete wavesurfer&#039;, function(event, request, settings) {\n\tif (typeof settings !== &#039;undefined&#039;) {\n\t\tif (settings.success.name === &#039;wavesurfer_wp_ajax&#039;) return;\n\t} else {\n\t\tWaveSurferInit();\n\t}\n});<\/code><\/pre>\n<p>In line:<br \/>\n<code>if (settings.success.name === &#039;wavesurfer_wp_ajax&#039;) return;<\/code><\/p>\n<p>Using load():<\/p>\n<p><code>jQuery(&quot;#div&quot;).load(location.href + &quot; #div&quot;);<\/code><\/p>\n<p>How i can fix this?<\/p>\n","protected":false},"template":"","class_list":["post-12269844","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12269844","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":2,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12269844\/revisions"}],"predecessor-version":[{"id":12269852,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12269844\/revisions\/12269852"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=12269844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}