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

355Slide Element Toggle

Expand Messages
  • tbtingey
    Feb 28, 2006
      Awesome library. I look forward to using to create my own components.
      Speaking of which, I am trying to create an effect similar to the
      scriptaculous slide toggle:
      (see the slide effect)

      Anyway, I'm getting an error in IE (and not in firefox) when I try to
      access the height on the element that I'm "sliding" up/away. Here's my
      js file:

      var UpAttributes = {
      height: {to: 0, unit: 'px'},
      fontSize: {from: 100, to: 0, unit: '%'},
      opacity: { to: 0 }

      var DownAttributes = {
      height: {to: 100, unit: 'px'},
      fontSize: {from: 0, to: 100, unit: '%'},
      opacity: { to: 1 }

      function SlideUp(owner)
      var AppointmentsDivSlideUp = new YAHOO.util.Anim(owner,
      UpAttributes, .5, YAHOO.util.Easing.easeNone);

      function SlideDown(owner)
      var AppointmentsDivSlideDown = new YAHOO.util.Anim(owner,
      DownAttributes, .5, YAHOO.util.Easing.easeNone);

      function ToggleCategory(ownerId)
      var owner = YAHOO.util.Dom.get(ownerId);
      var height = YAHOO.util.Dom.getStyle(owner, 'height');
      var isUp = height=='0px';


      I have a div with an onclick event handler that calls ToggleCategory
      with the id of the element(another div) that I'm trying to "slide".
      The error that I get is "Invalid argument" on line 10 of dom.js
      (starting with "break;default:") with the following causing the error:
      where property == 'height', val == 'NaN%', el = div

      If I drill into it, el.height is 'auto'

      Any ideas?

    • Show all 4 messages in this topic