Results 1 to 5 of 5

Thread: ddaccordion: follow headerlinks when menu is open

  1. #1
    Join Date
    Jun 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default ddaccordion: follow headerlinks when menu is open

    1) Script Title: ddaccordion

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

    3) Describe problem:

    Hi i'm working on this: http://bureaucreaties.nl/dev/0016sd/nl/producten/8.html

    I'm using:
    revealtype: "clickgo"

    This is great because i like the effect to open the menu under the header end then follow the header link which i need to get to the overview page

    The problem is that if the menu under a header is allready opened and i click on the header again then the page is not being redirected to the headerlink (in this case the overviewpage).

    Is there a way to get that done?

    I hope someone can help me.
    Kind regards, Bas

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

    Default

    That's by design actually. When a header is already expanded, it's assumed the user is already on the page the header links to. Clicking on the header again contracts the header, instead of just reloading the page for example...
    DD Admin

  3. #3
    Join Date
    Jun 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    If it's by design then i guess it's not designed with this situation in mind.

    Take a look at a menu structure like this.
    How can someone return to header2 (Overwiewpage) if the menu is open? For example looking at specific 1?

    > Header 1
    > Header 2 (Overviewpage)
    --> specific 1
    --> specific 2
    --> specific 3
    > Header 3

    I would like to change the script to get this done, but my script skills are not that good. I will try it this week, but i assumed that someone of dd could do this more easily.

  4. #4
    Join Date
    Jun 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    well, i have tried to hack it the way i described above, but my knowledge of javascript and jquery just don't get me there.

    I hope that more people see the extra value to code a function in this script to do that.

    Is there anyone that can help me. Also when ik use clickgo it works fine except for the last menu. It opens and when the page loads in collapse again. Is this a bug?

    Thanks in advance

  5. #5
    Join Date
    Jun 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    btw i use this init:

    Code:
    ddaccordion.init({
    	headerclass: "submenuheader", //Shared CSS class name of headers group
    	contentclass: "submenu", //Shared CSS class name of contents group
    	revealtype: "clickgo", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover
    	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
    	defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
    	onemustopen: true, //Specify whether at least one header should be open always (so never all headers closed)
    	animatedefault: false, //Should contents open by default be animated into view?
    	persiststate: true, //persist state of opened contents within browser session?
    	toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
    	togglehtml: ["suffix", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
    	animatespeed: "fast", //speed of animation: "fast", "normal", or "slow"
    	oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
    		//do nothing
    	},
    	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
    		//do nothing
    		if (isuseractivated==true){
    		  		// alert('cool')
    		}
    		if (state=="expand"){
    		//	alert('also cool')
    		}
    	}
    })

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
  •