'; }); $('#comments_content').empty().html(content); // comment toggle $('.mg__comment_state_control').live('click', function () { var comment_id = this.id.split('__')[2]; var action = this.lastChild.data.slice(1); if (action == 'Mark active') { var state_value = 'active'; } else if (action == 'Mark inactive') { var state_value = 'inactive'; } $.ajax({ type: 'POST', url: '/api/comments/set/' + state_value + '/', data: {comment_id: comment_id, ctype: mg_ctype, cid: mg_cid}, cache: false, dataType: 'json', success: function (json) { if (json.success == 'true') { if (json.comment_txt) { $('#mg__comment_content__' + comment_id).empty().text(json.comment_txt); $('#mg__comment_state_control__' + comment_id).empty().html('
Source:
No comments:
Post a Comment