Make a frame expand/collapse on click?

Discussion in 'Web Design and Development' started by Macman1993, Jul 23, 2009.

  1. Macman1993 macrumors 6502

    Macman1993

    Joined:
    Nov 23, 2007
    #1
    I had a thought earlier that bases a bit off the facebook chat. I have a chatbox that I want to add the bottom of pages on a website. I don't want the chatbox to constantly be available on the bottom as that looks ugly IMO. I was thinking that I would add a frame to the bottom of the pages. In its default state only the text or a picture saying "Click to expand/collapse chat" would be visible. Clicking that text/picture would resize the frame making the chatbox visible in a way that looks nice. Is this possible using just html? If not what do I need to do to add this feature?
     
  2. m3kilpat macrumors regular

    Joined:
    Jul 6, 2009
    #2
    You need to use CSS and Javascript. It's actually not too too difficult. Here is a link I found from a quick search that may help you. In a nutshell you need a div tag to be hidden and unhidden when a link or button is clicked. The hiding/unhiding is a javascript call.

    Hope this helps.
     

Share This Page