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

Menu changes in 2.4 - hassubmenu dom node

Expand Messages
  • Thuong N
    I have a question regarding the changes made to Menu in YUI 2.4, in particular, the removal of the DOM node for the menu indicator. Before 2.4, there is an
    Message 1 of 2 , Jan 10, 2008
    • 0 Attachment
      I have a question regarding the changes made to Menu in YUI 2.4, in
      particular, the removal of the DOM node for the menu indicator.

      Before 2.4, there is an <em> element that has a css selector for
      submenu indicator. YUI 2.4 remove it and put the css selector in its
      parent node (<a>). Well, this change breaks what we had for the menu.
      We set the background of the <a> element so that it shows up as an
      icon of the menu item ... while the <em> element still display the
      icon for the submenu indicator.

      Question is ... why the change? less HTML generated?

      Is there a way i can still have both the icon and the submenu
      indicator icon? Not very good in CSS ... but from looking at the HTML
      in Firebug, i can't seem to find a way to have both icon with the new
      HTML (DOM structure).

      thanks!
      -tn
    • Todd Kloots
      Thuong - The reason for the change was to simplify the markup. This has two benefits - less markup to generate is better for performance. Plus it makes it
      Message 2 of 2 , Jan 29, 2008
      • 0 Attachment
        Thuong -

        The reason for the change was to simplify the markup. This has two
        benefits - less markup to generate is better for performance. Plus it
        makes it easier to style. If you are looking for an example of how to
        style MenuItems with both and icon and the arrow indicator, look at this
        Menu example:

        http://developer.yahoo.com/yui/examples/menu/programsmenu_source.html

        - Todd

        Thuong N wrote:
        >
        > I have a question regarding the changes made to Menu in YUI 2.4, in
        > particular, the removal of the DOM node for the menu indicator.
        >
        > Before 2.4, there is an <em> element that has a css selector for
        > submenu indicator. YUI 2.4 remove it and put the css selector in its
        > parent node (<a>). Well, this change breaks what we had for the menu.
        > We set the background of the <a> element so that it shows up as an
        > icon of the menu item ... while the <em> element still display the
        > icon for the submenu indicator.
        >
        > Question is ... why the change? less HTML generated?
        >
        > Is there a way i can still have both the icon and the submenu
        > indicator icon? Not very good in CSS ... but from looking at the HTML
        > in Firebug, i can't seem to find a way to have both icon with the new
        > HTML (DOM structure).
        >
        > thanks!
        > -tn
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.