web/assets/questions/questions-answers.js
/**
 * adds a remove button to the panel that is passed in the parameter
 * @param $panel
 */
adds a remove button to the panel that is passed in the parameter
@param $panel
adds a remove button to the panel that is passed in the parameter @param $panel
function addRemoveButton ($panel) {
    var $removeButton = $('<div class="col-md-2"><a href="#"  class="btn btn-primary pull-left btn_trash"><i class="fa fa-trash"></i></a></div>');
    $removeButton.click(function (e) {
        e.preventDefault();
        $(e.target).parents('.panel').slideUp(1000, function () {
            $(this).remove();
        })
    });
    $panel.append($removeButton);
}
function addRemoveButton ( $panel ) { var $removeButton = $ ( '<div class="col-md-2"><a href="#"  class="btn btn-primary pull-left btn_trash"><i class="fa fa-trash"></i></a></div>' ) ; $removeButton . click ( function ( e ) { e . preventDefault ( ) ; $ ( e . target ) . parents ( '.panel' ) . slideUp ( 1000 , function ( ) { $ ( this ) . remove ( ) ; } ) } ) ; $panel . append ( $removeButton ) ; }
adds a remove button to the panel that is passed in the parameter
 @param $panel
adds a remove button to the panel that is passed in the parameter @param $panel
// create remove button