SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict ghostme's Avatar
    Join Date
    Feb 2005
    Posts
    371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Slide effect in toggle div

    Hello good pple of the forum
    Please the code below is just a simple implementation of how to add a show and hide div effect. However, what i need to do is to add a sliding effect to the script when it is clicked.
    PHP Code:
    function toggleDiv(divid){
        if(
    document.getElementById(divid).style.display == 'none'){
          
    document.getElementById(divid).style.display 'block';
        }else{
          
    document.getElementById(divid).style.display 'none';
        }
      } 
    Cheers

  2. #2
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And where is the slide code that you need help with?

  3. #3
    SitePoint Enthusiast Jmz's Avatar
    Join Date
    Jun 2005
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could use something like Script.aculo.us to do this. I used it to make http://webdesign.synergiq.co.uk

  4. #4
    SitePoint Addict ghostme's Avatar
    Join Date
    Feb 2005
    Posts
    371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks jmz and pepe


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •