From ac0e560a132899400c0cf25b209bacd7f86285e5 Mon Sep 17 00:00:00 2001
From: Phil Johnston <support@mintplugins.com>
Date: Thu, 18 Jun 2015 15:40:37 -0400
Subject: [PATCH] Make postboxes open/close if added after DOM
If you have a plugin which adds a metabox to the page at runtime, the "handlediv" button which shows/hides the contents of that metabox doesn't work.
---
wp-admin/js/postbox.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wp-admin/js/postbox.js b/wp-admin/js/postbox.js
index 07e5ed2..560147b 100644
a
|
b
|
var postboxes; |
11 | 11 | |
12 | 12 | self.init(page, args); |
13 | 13 | |
14 | | $('.postbox .hndle, .postbox .handlediv').bind('click.postboxes', function() { |
| 14 | $( document ).on( '.postbox .hndle, .postbox .handlediv', 'click.postboxes', function() { |
15 | 15 | var p = $(this).parent('.postbox'), id = p.attr('id'); |
16 | 16 | |
17 | 17 | if ( 'dashboard_browser_nag' == id ) |