Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] bug? Re: problem building explicitly called style classes for button menus..

Expand Messages
  • Todd Kloots
    Jacob - If you pass an HTML element reference, HTML element id or array of YAHOO.widget.MenuItem configuration properties to the button s menu configuration
    Message 1 of 8 , Apr 30 10:37 AM
    View Source
    • 0 Attachment
      Jacob -

      If you pass an HTML element reference, HTML element id or array of
      YAHOO.widget.MenuItem configuration properties to the button's "menu"
      configuration attribute, then the menu will be lazy loaded. This is not
      a bug, but rather a performance consideration. The "menu" configuration
      attribute can also accept a YAHOO.widget.Menu instance, allowing you to
      create a Menu with a specific id so that you can create more specific
      style rules to customize the look of each button's menu. Here is an
      example for you:

      http://yuiblog.com/sandbox/yui/v222/examples/button/example01.php

      I hope that helps you with your project.

      - Todd


      foggjacob wrote:
      > Okay, I figured out the problem I am having... I am creating the menu
      > dynamically... so when the button menu is created the the container
      > portion of the menu is not initialized and does not exist in the DOM,
      > so I think that when the CSS walks the DOM it is not finding
      > "#testDrop .yuimenu .bd"... in fact I cannot even access it via
      > JavaScript until I have clicked the button... Is this a Bug? or is
      > this by design... to clear up any confusion I am not using the lazy
      > load feature... I am hoping there is some sort of work around so that
      > I can set the width, height and background-color styles of the
      > specific .bd (each of the .bd elements are unique and I will have 6+
      > elements on page)... my thought for a workaround was that when I
      > initialize the element I could add a CSS style or id of the element to
      > the .bd and apply the style that way... however since the element does
      > not yet exist that is not working. Any help would be Amazingly
      > appreciated!!! I am running behind schedule on this project...
      >
      > -jacob
      >
      >
      > --- In ydn-javascript@yahoogroups.com, "foggjacob" <foggjacobn@...> wrote:
      >
      >> --- In ydn-javascript@yahoogroups.com, "alexshusta"
      >> <alexander.shusta@> wrote:
      >>
      >>> However, I
      >>> will say, don't forget about the grandparent operator "*" as it's
      >>> often helped me get to build selectors that are targeted enough to be
      >>> really useful while allowing for flexibility in the ordering of child
      >>> elements inside a parent.
      >>>
      >>>
      >> That sounds like a winner! I have never used the "grandparent operator
      >> '*'"... a little info on that would be greatly appreciated... is it
      >> used like "#grandparent * .bd ??
      >>
      >> Thanks again!
      >>
      >>
      >
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.