SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2004
    Location
    Orlando, FL
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Resize contents of a div with php/javascript?

    I used to have a script that would display all of the contents within a div (including images, embeds, etc) at a % that I specified in the script.

    The div would have a plus sign at the bottom, when the user clicked it, it would enlarge it to 100%. It would then turn into a minus sign, and the div would then go back to the originally specified % if they clicked it again.

    Can't recall the name of the script or where I originally got it, but my attempts to find it (or a similar script) again have been fruitless. Can anyone point me in the direction of where I might be able to find it, or how to create it myself?

  2. #2
    SitePoint Evangelist
    Join Date
    Jun 2007
    Location
    North Yorkshire, UK
    Posts
    483
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You might like to take a look at this

    http://www.brothercake.com/site/reso...scripts/iotbs/

  3. #3
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are comfortable using third party libraries/frameworks like jquery, you can use jquery toggle feature with animation.
    http://docs.jquery.com/Effects/toggle#demo
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  4. #4
    SitePoint Evangelist
    Join Date
    Jun 2007
    Location
    North Yorkshire, UK
    Posts
    483
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    toggle would only seem to show and hide elements it doesn't do a resize.

  5. #5
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by PhilipToop View Post
    toggle would only seem to show and hide elements it doesn't do a resize.
    It can be managed resizing as well. What it needs is to have two things one small size and another large size that's it. Did you see all the examples there? One is similar type of example.
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5


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
  •