def hide_code_cells():
    """
    Hides the code cells of a notebook (for exporting notebooks without code)

    Returns
    -------
        button : <HTML button>
            Button that toggles code cells on/off
    """
    from IPython.display import HTML
    button = HTML(
        """<script>
                        code_show=true; 
                        function code_toggle() {
                            if (code_show){
                                $('div.input').hide();
                            } else {
                                $('div.input').show();
                            }
                        code_show = !code_show
                        } 
                        $( document ).ready(code_toggle);
                    </script>
    <form action="javascript:code_toggle()">
        <input style="background-color:#441297;
                      color:#FFFFFF;
                      padding:15px;
                      font-family:Calibri, Arial;
                      border:None;
                      border-radius:2px"
               type="submit" value="Click here to toggle code cells.">
    </form>"""
        )
    return button
