Results 1 to 1 of 1

Thread: Ajax Animated Collapsible IE

  1. #1
    Join Date
    Jan 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ajax Animated Collapsible IE

    1) Script Title: Animated Collapsible DIV v2.4

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...edcollapse.htm

    3) Describe problem: I am trying to dynaimcally load via ajax, links with divs and each time an additional link and div are added to the page them also have the animated collapse capability. In Firefox and Chrome I have no issues but in IE8 it all goes wrong and only the most recently added div is collapsible. When ajax reads a successfull return I add the responseText to the end of the target div's innerHTML, add the id of the div to the end of an array then loop through this array with

    for(i=0;i<Items.length;i++){

    animatedcollapse.addDiv(Items[i],'fade=1,speed=200,hide=1');

    }

    //then finally

    animatedcollapse.ontoggle=function($, divobj, state){}
    animatedcollapse.init();

    I found an uninit() method and tried using that onload of a new div but that is also not working.

    If I build out an array in JS var ar = newArray('1','2','3','4'); then add all 4 divs in one ajax call then loop
    for(i=0;i<ar.length;i++){

    animatedcollapse.addDiv(ar[i],'fade=1,speed=200,hide=1');

    }

    all 4 divs work fine, but if i try and add individual divs after the first call to
    animatedcollapse.ontoggle=function($, divobj, state){};
    //AND
    animatedcollapse.init();

    only the last one added works
    Last edited by davethomas; 01-24-2011 at 05:49 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •