Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Junior Member gimmyfood's Avatar
    Join Date
    Dec 2004
    Location
    Sydney, Australia
    Posts
    7
    Member #
    8366
    I was wondering if anyone could help me.

    I really like the script that makes the WDF forums bigger and smaller!! (look up on the header)...

    Ive done many many searches in WDF, and google, but have been unsuccessful!

    Does anyone know how to do it, or could point me sumwhere to learn how?

  2.  

  3. #2
    Senior Member Eddy Bones's Avatar
    Join Date
    Jan 2004
    Location
    Washington, USA
    Posts
    1,054
    Member #
    4651
    If you want to find out anything about any site, look in its source code. It's a good way to learn new techniques. I don't know if people will get very happy if you jack their code though. On the other hand, what can they do about it, and why not help other people out? It's not as if they want to jack the whole site - images, content and all.

    By the way, just to make your searching easier, JavaScript is used on this site, though I can think of a few other ways of doing it.

  4. #3
    Junior Member gimmyfood's Avatar
    Join Date
    Dec 2004
    Location
    Sydney, Australia
    Posts
    7
    Member #
    8366
    Thanx, i have allready browsed the source content and attached files and couldn't work it out! however, being respectfull I thought i would ask before I stole!

    It's a combo of css and javascript! I'll have another look at it later and try again. Just wondering if anyone knew how, to try and learn more about what it does and more importnly, HOW it does it

    Would anyone possibly know of any good sites that may have similar scripts on it!

  5. #4
    Member
    Join Date
    Jan 2005
    Posts
    97
    Member #
    8727
    Most likely, it uses Javascript to adjust the CSS. Looking at the source, it uses this script:
    var cookieName = "bb_preferliquidoverstatic";
    HTML Code:
    function updateLinkText()
    {
    	newLinkText = (preferLiquidOverStatic ? smallerLinkText : biggerLinkText);
    	document.getElementById("biggersmallerlink").innerHTML = newLinkText;
    }
    
    function updatePageCssClass()
    {
    	newClass = preferLiquidOverStatic ? "entirepage-liquid" : "entirepage-static";
    	document.getElementById("entirepage").className = newClass;
    }
    
    function liquidStaticToggle()
    {
    	preferLiquidOverStatic = !preferLiquidOverStatic;
    	flipStateCookie();
    	updateLinkText();
    	updatePageCssClass();
    }
    The first function changes the text from [Bigger>>] to [<<Smaller] and the second function changes the CSS class (of the main page of the box to turn in either the liquid class, or the static class.
    This entire script is in /customscripts/liquidstatictoggler.js

  6. #5
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    http://www.simplebits.com/ has the same function - I don't know if it's explained anywhere on that site but it may well be. It's actually quite straightforward if your CSS is well written in the first place.

  7. #6
    Junior Member gimmyfood's Avatar
    Join Date
    Dec 2004
    Location
    Sydney, Australia
    Posts
    7
    Member #
    8366
    Thanx for the input guys.

    Ive read through WDFs code before and tried to reproduce the same effect but failed. I will try again, I might have missed somthing.

    I'll also check out the other site and have alook to see if it's the same or similar.

    Does anyone else know of any similar sites?

  8. #7
    Member averan's Avatar
    Join Date
    Jan 2005
    Posts
    39
    Member #
    8796
    hey gimmy, i totally want to figure this out too, especially how to resize images as well. but check out this helpful link....

    http://webmonkey.wired.com/webmonkey.../?tw=reference

    that might solve your problem....i hope.
    -averan

  9. #8
    Member averan's Avatar
    Join Date
    Jan 2005
    Posts
    39
    Member #
    8796
    also, if you use dreamweaver, try this...

    http://webmonkey.wired.com/webmonkey...tor_extensions

    -averan


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:00 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com