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

RE: [ydn-javascript] Re: Problem with apply parameter to getElementsByClassName

Expand Messages
  • Satyen Desai
    Hi, Your apply function should get a reference to the element(s) found... yd.getElementsByClassName( QandA , div , wall_posts , function (el)
    Message 1 of 5 , Mar 31, 2009
    • 0 Attachment
      Hi,

      Your "apply" function should get a reference to the element(s) found...

      yd.getElementsByClassName('QandA','div','wall_posts',
      function (el) {yd.setStyle(el,'display','block');});

      Regards,
      Satyen

      ________________________________________
      From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of jrbramble
      Sent: Tuesday, March 31, 2009 9:09 AM
      To: ydn-javascript@yahoogroups.com
      Subject: [ydn-javascript] Re: Problem with apply parameter to getElementsByClassName

      When I used this for the first time, I needed to use the onDomReady to get it to work.

      --- In ydn-javascript@yahoogroups.com, "brendangibson" <brendangibson@...> wrote:
      >
      > I am upgrading from YUI2.5.3 to YUI2.7.0 and am having some troubles.
      >
      > I get an error with this piece of code:
      >
      > yd.getElementsByClassName('QandA','div','wall_posts',function () {yd.setStyle(this,'display','block');});
      >
      > In YUI2.5.3 it seemed that 'this' was set to each node returned by getElementsByClassName in turn. However in YUI2.7.0 it doesn't seem to be happening this way.
      >
      > I noticed that some bugs with getElementsByClassName had been fixed in YUI2.7.0, but they seem to have taken away the functionality that I previously used.
      >
      > How do I modify my code to work in YUI2.7.0? My debugging is not giving me any luv.
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.