Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Accordion ddaccordion Help

  1. #1
    Join Date
    Feb 2008
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Accordion ddaccordion Help

    1) Script Title: Accordion Menu Script

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

    3) Describe problem:

    When the menu takes me to a new page, the menu is supposed to stay expanded due to the cookie function, but when the new page is loading, the menu collapsed first then expands...is that what it is supposed to do? is it possible to avoid seeing it collapse? I hope I am being clear... I would just like to see that when click on a menu item, when the new page is loading, the menu is already displaying the expanded state.

    also, when i click back to home page, is it possible to have the menu go back to its original state?? if the accorion menu is not supposed to do what i need, can someone point me to another menu i can use to do what i need please?!!!

    can someone help please?!!!

    thanks.
    Last edited by yuchien; 03-04-2008 at 03:16 AM. Reason: explain the question better

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

    Default

    Hmm this is normal behavior (all headers are initially hidden before the script determines which ones should be open), though unless your page is very long, the entire process should occur so fast it's barely noticeable...

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

    Default

    Thank you for your responce!!!

    what about, when I hit back, and even hitting the homepage button, that the menu should go back to its original state, collapsed, not expanded.

    can this be done?!

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

    Default

    Quote Originally Posted by yuchien View Post
    Thank you for your responce!!!

    what about, when I hit back, and even hitting the homepage button, that the menu should go back to its original state, collapsed, not expanded.

    can this be done?!
    Not sure I understand what you're trying to do here. Are you asking how to set up the menu so it's fully collapsed when the page first loads? This can be done inside the settings:

    Code:
    	defaultexpanded: [], //index of content(s) open by default [index1, index2, etc]. [] denotes no content

  5. #5
    Join Date
    Feb 2008
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    no, sorry...English is not my first language..let me try it again here.

    What I would like it to do is this: after I have visited the page under a subheader, I want to go back a page, or even back to the homepage. The menu then still appears to be expanded (i understand this to be the effect of the cookies). however, is there a way to only apply the cookies when going to sub menus?

    if not, is there a different approach i have to take to achieve that effect?

  6. #6
    Join Date
    Feb 2008
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    anyone? please...

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

    Default

    I think I understand. Try the below ddaccordion.js file, which now sees if it should persist the menu states only when the sub content DIV is clicked on (ie: a link within it). By default this was done whenever the page unloads.

  8. #8
    Join Date
    Feb 2008
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    However, by doing it this way, the help that you provided me before regarding opening an url when clicking on the header does not work anymore. what you told me to do was to // return false in the js file.

    so what should I do to keep the capabilty of opening a new page by clicking on the header and at the same time persis the menu states only when the sub content DIV is clicked on....

    I hope i am clear...thanks alot!

    this is the link to what i am working on
    http://www.theglobalinkgroup.com/index1.html

    currently only the header "about us" and its content is working with content. So what I need is for clicking on about us and it takes the visitors to an about us page and expanding the menu at the same time. but when I click back, it should not persist the menu in an expanded mode.
    Last edited by yuchien; 03-07-2008 at 03:00 AM. Reason: trying to be clearer

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

    Default

    Hmm I don't see why commenting out "return false" would stop working in terms of allowing the header to now be linkable in the new ddaccordion.js file I provided above. Nothing has changed to affect that part of the script. Are you saying doing this no longer works for you?

    Code:
    				else{
    					ddaccordion.collapseit($(this), $subcontent, config)
    				}
    				//return false
     	})

  10. #10
    Join Date
    Feb 2008
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    yes...its weird...after i commenting out //return false with the new file you provided above. the menu does not expand anymore. as well as it still persist to show the expanded menu....

    http://www.theglobalinkgroup.com/index1.html click on about us...you will see what i mean

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
  •