• Steven

    (@lamsteven94)


    Hello!

    I must first say, I really like this plugin and it’s awesome! I would like to create some buttons to show and hide these code snippets because they can get lengthy. However my code does not work and I can’t seem to understand why.

    <button class=”codeButtons” onclick=”show(‘code6’)”>Show Me</button> <button class=”codeButtons” onclick=”hide(‘code6’)”>Hide</button>
    </p>
    <div id=”code6″ style=”display:none;”>[snippet id=”52″]</div>

    and the functions show and hide are:
    function hide(name)
    {
    document.getElementById(name).style.display=”none”;
    }

    function show(name)
    {
    document.getElementById(name).style.display=”block”;
    }

    – When I press the show button, it reveals the div but not the code snippet. Do you have any advice as to how I can solve this issue?

    https://www.ads-software.com/plugins/code-snippet-library/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Show/Hide Code Snippets’ is closed to new replies.