Results 1 to 5 of 5

Thread: Accordion

  1. #1
    Join Date
    Apr 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Accordion

    1) Script Title: Accordion
    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...daccordion.htm
    3) Describe problem:
    I have two questions:
    1. is ddaccordion.js 1.3 on the server for download (i am in doubt because there's no changed log)
    2. with the 'onopenclose'-function i want to open the URL linked in the header. I use this script:
    onopenclose:function(header, index, state, isclicked){
    if (state=="block" && isclicked==true)
    window.location.assign(header.getAttribute('href'))
    }
    }

    What's wrong?

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    1) Yes, the changed log is near the top of the .js file actually.
    2) Instead of:

    Code:
    window.location.assign(header.getAttribute('href'))
    It should be something like:

    Code:
    window.location.replace(header.getAttribute('href'))

  3. #3
    Join Date
    Apr 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    1. Are you sure, because the text at the top of the .js just says:

    //Accordion Content script: By Dynamic Drive, at http://www.dynamicdrive.com
    //Created: Jan 7th, 08'

    2. I tried:

    onopenclose:function(header, index, state, isclicked){
    if (state=="block" && isclicked==true){
    window.location.replace(header.getAttribute('href'))
    }
    }

    but it doesn't work. More ideas?

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hmm the .js file that's listed and available to download at the main script page should have:

    Code:
    //Accordion Content script: By Dynamic Drive, at http://www.dynamicdrive.com
    //Created: Jan 7th, 08'
    //Version 1.3: April 3rd, 08':
    //**1) Script now no longer conflicts with other JS frameworks
    //**2) Adds custom oninit() and onopenclose() event handlers that fire when Accordion Content instance has initalized, plus whenever a header is opened/closed
    //**3) Adds support for expanding header(s) using the URL parameter (ie: http://mysite.com/accordion.htm?headerclass=0,1)
    listed at the top. Are you not seeing this?

  5. #5
    Join Date
    Apr 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You are right. I'm sorry, i should have refreshed my cache.
    But unfortunately the new script generates an error. It seems that it can't be used together with Thickbox and that's strange (?) because they both use the Jquery-library. Is there a solution?

    Update: i found a solution. I left out: "jQuery.noConflict()" and it works allright!
    Last edited by antoncornel; 04-06-2008 at 11:00 AM.

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
  •