You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1Accept Show/Hide Content Wed Jun 13, 2012 10:22 am

  • L PROMEGA

    L

    CreativeDesignz
    Web Design and Coding
    Making Show/Hide Content
    Showing and hiding content

    This tutorial will tell you how to make show/hide a content
    <a onclick ="javascript:ShowHide('HiddenDiv_1')" href="javascript:;" >Show/Hide Content</a>
    <div id="HiddenDiv_1" style="DISPLAY: none" >The Content</div>

    <script language="JavaScript">function ShowHide(divId){if(document.getElementById(divId).style.display == 'none'){document.getElementById(divId).style.display='block';}else{document.getElementById(divId).style.display = 'none';}}</script>
    Code:



    If you want to put more show/hide content, You'll have to put the different code that colored red
    <a onclick ="javascript:ShowHide('HiddenDiv_1')" href="javascript:;" >Show/Hide Content</a>
    <div id="HiddenDiv_1" style="DISPLAY: none" >The Content</div>

    <script language="JavaScript">function ShowHide(divId){if(document.getElementById(divId).style.display == 'none'){document.getElementById(divId).style.display='block';}else{document.getElementById(divId).style.display = 'none';}}</script>

    That it.

    DEMO: LINK
    Notice : This tutorial is copyrighted by CreativeDesignz. You may not publish it on anywhere without written permission from the administrators.

    ADMIN

    2Accept Re: Show/Hide Content Wed Jun 13, 2012 10:26 am

  • Verrell123 ADMIN

    Verrell123
    Congratulations, your tutorial has been accepted.
    Thank for your contribution Very Happy

    Tutorial Accepted

    http://verrell123.co.cc/

    3Accept Re: Show/Hide Content Wed Jun 13, 2012 2:16 pm

  • 5ix

    5ix
    Great tutorial dude!

    Sponsored content


    View previous topic View next topic Back to top  Message [Page 1 of 1]

    Permissions in this forum:
    You cannot reply to topics in this forum