function hidePreview() {
    var pageWidth = $('#content').innerWidth();
    var left_panel = $('#left_panel');
    var showPreview = $('#showPreview');

    $('#preview').hide();
    showPreview.show();

    if (left_panel.css('display') == 'none') {
        setEditorHundredPerc();
    } else {
        var leftPanelWidth = (100*left_panel.width())/pageWidth;
        $('#editor').width(100 - leftPanelWidth - showButtonsPercentWidth + '%');
        left_panel.width(leftPanelWidth+'%')
    }

    document.getElementById('preview').style.left = 0;
}
/**
 * Hide preview and show button which can display preview.
 */
Hide preview and show button which can display preview.
Hide preview and show button which can display preview .
function hidePreview() {
    var pageWidth = $('#content').innerWidth();
    var left_panel = $('#left_panel');
    var showPreview = $('#showPreview');
    $('#preview').hide();
    showPreview.show();
    if (left_panel.css('display') == 'none') {
        setEditorHundredPerc();
    } else {
        var leftPanelWidth = (100*left_panel.width())/pageWidth;
        $('#editor').width(100 - leftPanelWidth - showButtonsPercentWidth + '%');
        left_panel.width(leftPanelWidth+'%')
    }
    document.getElementById('preview').style.left = 0;
}
function hidePreview ( ) { var pageWidth = $ ( '#content' ) . innerWidth ( ) ; var left_panel = $ ( '#left_panel' ) ; var showPreview = $ ( '#showPreview' ) ; $ ( '#preview' ) . hide ( ) ; showPreview . show ( ) ; if ( left_panel . css ( 'display' ) == 'none' ) { setEditorHundredPerc ( ) ; } else { var leftPanelWidth = ( 100 * left_panel . width ( ) ) / pageWidth ; $ ( '#editor' ) . width ( 100 - leftPanelWidth - showButtonsPercentWidth + '%' ) ; left_panel . width ( leftPanelWidth + '%' ) } document . getElementById ( 'preview' ) . style . left = 0 ; }
Hide preview and show button which can display preview.
Hide preview and show button which can display preview .