Results 1 to 5 of 5

Thread: Jump to anchor inside Accordion header ?

  1. #1
    Join Date
    Apr 2008
    Location
    France
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Jump to anchor inside Accordion header ?

    1) Script Title: Accordion Content

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

    3) Describe problem:


    Hello,

    In a html file, I have a huge list of anchor. I works well : jump to an anchor from another page.
    Then I added accordion script to split and organize the list in several parts.

    I used this suggestion :
    Code:
    <a href="target.htm?accordionheaderclass=2#myanchor">Target Page</a>
    in the thread http://www.dynamicdrive.com/forums/s...ad.php?t=40366

    But it the link with header and an anchor does not work : it does not jump to the anchor in the expanded header.

    Anyone succedeed ?

    Christophe

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

    Default

    Do you have a link to the problem page?
    DD Admin

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

    Default

    Here is a test code : http://pastebin.com/m171f7717


    Here is initjq.js content (I deleted useless code except for accordion in fact) :
    Code:
    ddaccordion.init({
      headerclass: "collapsehead", contentclass: "collapse", 
      collapseprev: false, defaultexpanded: lExp,
      animatedefault: false, persiststate: false, 
      toggleclass: ["", ""], 
      togglehtml: ["prefix", "<img src=\'/lib/plus.gif\' alt=\'plus\' />&nbsp;", "<img src=\'/lib/minus.gif\' alt=\'moins\' />&nbsp;"], 
      animatespeed: "fast", 
      oninit:function(expandedindices){ //do nothing 
      },
      onopenclose:function(header, index, state, isclicked){ // do nothing
      }
    })
    The html page can be reached by this :
    Code:
    <html>
    <body>
    
    <a href="testanchor.html?collapsehead=1#TEST170">TEST170</a>
    </body>
    </html>
    I updated jquery to last version.

    It works simply by deleting the line with initjq.js...


    Christophe

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

    Default

    Hmm do you have a link to an actual working page? The above merely shows the HTML source, but I need to be able to run the page to see the problem.
    DD Admin

  5. #5
    Join Date
    Apr 2008
    Location
    France
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    No I can't as it is an intranet at work...

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
  •