Page 6 of 8 FirstFirst ... 45678 LastLast
Results 51 to 60 of 75

Thread: [DHTML] Slashdot's Menu

  1. #51
    Join Date
    Feb 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Bug in Slashdot dynamic menu

    Hey Folks,

    If anyone can help me I would appreciate it. I downloaded the latest version that DimX posted on 10/14 and I'm getting a problem. Here is the javascript error:

    titles[hidden[i]] has no properties
    restore()menu.js (line 74)
    init()menu.js (line 55)
    [Break on this error] titles[hidden[i]].className = "titlehidden";


    This question was asked before but I didn't see a solution to the problem. If anyone could help I would appreciate it.

    TIA

  2. #52
    Join Date
    Jun 2006
    Posts
    182
    Thanks
    0
    Thanked 14 Times in 14 Posts

    Default Update

    Okay, I've completly rewritten the script (the OOP way) .
    It's now possible to have more than one menu on a single page.
    Also the menu is now easily controllable with various functions.

    CSS is also rewritten and menu's HTML structure has changed (no more img's on each title).
    Just one thing about CSS, current stylesheet uses the :first-child pseudo class, so in IE6 the first (top) title will look like others (no rounded corners). This is easily fixable by giving the top title some class name or id and using it instead of :first-child.

    You can also now make a submenu be collapsed, before even script loads, by giving it appropriate class name.

    Info & Demo: http://roboweb.awardspace.com/sdmenu/
    Download: http://roboweb.awardspace.com/sdmenu/sdmenu.zip
    Last edited by DimX; 03-18-2007 at 09:58 PM.

  3. #53
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,925
    Thanks
    43
    Thanked 3,190 Times in 3,154 Posts
    Blog Entries
    12

    Default

    Looks very nice!
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #54
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Yep, looking good! However, don't create functions inside the constructor. For example:
    Code:
    function MyObj() {
      this.pr = function() {
        return 3;
      };
    }
    will create a new function each time a MyObj instance is created, whereas:
    Code:
    function MyObj() {
    }
    
    MyObj.prototype.pr = function() {
      return 3;
    };
    only creates the function once, then reuses it.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #55
    Join Date
    Jun 2006
    Posts
    182
    Thanks
    0
    Thanked 14 Times in 14 Posts

    Default

    Thanks Twey . I've altered the code now.

  6. #56
    Join Date
    Aug 2004
    Posts
    9,878
    Thanks
    3
    Thanked 962 Times in 951 Posts
    Blog Entries
    15

    Default

    Great, I'll take a look at the new code soon, and if all is well, update the one on DD to match. Thanks!

  7. #57
    Join Date
    Mar 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default editing the menu

    Ive been playing around with the menu, and have it the way I want it...but I am now wondering if there is a way to make the background transparent on the menu so that it will show the page's background underneath. thanks

  8. #58
    Join Date
    Mar 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by greasycorpse View Post
    Ive been playing around with the menu, and have it the way I want it...but I am now wondering if there is a way to make the background transparent on the menu so that it will show the page's background underneath. thanks
    nevermind...seems I am too retarded to figure it out on my own before I ask the question haha

  9. #59
    Join Date
    Mar 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    As a newbie, I use the DD instructions to get my code to work, but now with the new code and the index.html page, I'm lost.

    I wonder if it would be possible to provide instructions like DD does like:
    1) Put this in the <head> section
    2) Put this other thing in the <body> section and
    3) And insert this information for each parameter

    One issue I'm having, using the old code that's currently on the DD site is that I want to have the entire menu collapsed upon entry to my website. And, I'm considering having submenus open up into other submenus.

    Instructions that show how to set the parameters using the new code would be wonderful!

    Thanks so much!

  10. #60
    Join Date
    Jun 2006
    Posts
    182
    Thanks
    0
    Thanked 14 Times in 14 Posts

    Default

    Quote Originally Posted by chicagonature View Post
    ... I want to have the entire menu collapsed upon entry to my website. And, I'm considering having submenus open up into other submenus.
    To make all menus collapsed by default you must add class="collapsed" to every div inside the menu:
    HTML Code:
    <div class="collapsed">
        <a href="...">...</a>
        ...
    </div>
    But it's impossible to have submenus inside submenus in this script!

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
  •