{"id":4938577,"date":"2014-05-21T15:31:40","date_gmt":"2014-05-21T15:31:40","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/javascript-replace-classname-help\/"},"modified":"2016-08-21T20:48:49","modified_gmt":"2016-08-21T20:48:49","slug":"javascript-replace-classname-help","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/javascript-replace-classname-help\/","title":{"rendered":"Javascript replace classname help."},"content":{"rendered":"<p>Hi Scott, <\/p>\n<p>Thanks for this plugin. It is giving me a solution that is workable right now. <\/p>\n<p>I am using the plugin Tabify Edit Screen, which since recent WordPress updates or plugin updates has quit supporting in php filter to register unregistered meta boxes. Make sense? <\/p>\n<p>I am replacing 1 or 2 class names through javascript to achieve what I need. <\/p>\n<p>I have the following.<br \/>\n<code><br \/>\ndocument.getElementById(\"psp_onpage_optimize_meta_box\").className = \".postbox.tabifybox.tabifybox-3\";<br \/>\n<\/code><\/p>\n<p>My question is when I do this the &#8220;sortable&#8221; post box for this meta box is not sortable. Is there a way to work this where I can replace a classname of a meta box using javascript but keep the metabox sortable?<\/p>\n<p>Thanks,<\/p>\n<p>https:\/\/wordpress.org\/plugins\/add-admin-javascript\/<\/p>\n","protected":false},"template":"","class_list":["post-4938577","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4938577","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":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4938577\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=4938577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}