(function () { $DOC.on('click', '.control', function (event) { var $target = $(event.target); if ($target.is('li')) { var handler = menuHandlers[$target.text()]; if (handler) { var $post = parent_post($target); var model = parent_model($target); handler(model, $post); } } var $menu = $(this).find('ul'); if ($menu.length) $menu.remove(); else { $menu = $('