From 8a89893b0210217264e1041408e50d8caffa846a Mon Sep 17 00:00:00 2001 From: czaks Date: Sun, 4 Aug 2013 01:53:37 -0400 Subject: [PATCH] quick-post-controls.js: fix javascript interactions --- js/quick-post-controls.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/quick-post-controls.js b/js/quick-post-controls.js index c28f874f..1cbc0711 100644 --- a/js/quick-post-controls.js +++ b/js/quick-post-controls.js @@ -71,10 +71,16 @@ $(document).ready(function(){ } }; - $('div.post input[type=checkbox].delete').each(function() { + var init_qpc = function() { $(this).change(open_form); if(this.checked) $(this).trigger('change'); + }; + + $('div.post input[type=checkbox].delete').each(init_qpc); + + $(document).bind('new_post', function(e, post) { + $(post).find('input[type=checkbox].delete').each(init_qpc); }); });