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

Re: [ydn-javascript] changing css properties onExpand

Expand Messages
  • Adam Moore
    ... var tree = new YAHOO.util.TreeView( hostdiv ); tree.onExpand = function(node) { // Change the background for the div that contains the entire node, //
    Message 1 of 3 , Feb 15, 2006
    • 0 Attachment
      On Wed, Feb 15, 2006 at 08:57:25PM -0000, viofis wrote:
      > This is probably a stupid question, but I can't get this to work:
      >
      > tree.onExpand = function(node) {
      > getEl().style.background="#000000";
      > }

      var tree = new YAHOO.util.TreeView("hostdiv");
      tree.onExpand = function(node) {
      // Change the background for the div that contains the entire node,
      // including the node's children. Probably not what you want.
      //
      // node.getEl().style.backgroundColor="#000000";

      // Change the background of the anchor tag that contains the label
      node.getLabelEl().style.backgroundColor="#000000";
      };


      -Adam
    Your message has been successfully submitted and would be delivered to recipients shortly.