Go Back   Dynamic Drive Forums > DD Scripts > Dynamic Drive scripts help
Search Dynamic Drive Forums:

Reply
 
Thread Tools Search this Thread
  #1  
Old 08-06-2008, 01:12 AM
zero3 zero3 is offline
New Comer (less than 5 posts)
 
Join Date: Aug 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Accordion Apple Style, OnMouseOut collapse All

Apple style Accordion Menu

http://www.dynamicdrive.com/dynamici...menu-apple.htm

My problem is, that i want onMouseOut from the header (where the header is already expanded) that will collapse the Header or All Headers...

i hope anybody can help me, please..

p.s: sorry for my bad-english, im from germany.
Reply With Quote
  #2  
Old 08-06-2008, 08:20 AM
ddadmin's Avatar
ddadmin ddadmin is offline
Administrator
 
Join Date: Aug 2004
Posts: 7,627
Thanks: 2
Thanked 639 Times in 629 Posts
Blog Entries: 13
Default

If you mean have the expanded header collapse when the mouse rolls out of it, even if into open space on the page, inside ddaccordion.js, try adding the lines in red to the existing code:

Code:
			else{
				$(this).trigger("evt_accordion")
				return false //cancel default click behavior
			}
		})
		if (config.revealtype=="mouseenter"){
			$('.'+config["headerclass"]).bind("mouseleave", function(){
			ddaccordion.collapseone(config["headerclass"], parseInt($(this).attr("headerindex")))
		})
		}
Or if you want, just use the modified ddaccordion.js file attached below instead.
Attached Files
File Type: js ddaccordion.js (11.0 KB, 150 views)
__________________
DD Admin
Reply With Quote
  #3  
Old 08-06-2008, 12:42 PM
zero3 zero3 is offline
New Comer (less than 5 posts)
 
Join Date: Aug 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hey, ddadmin, thats perfect... thank you very much.

but i have a second problem "now", when i Mouseover the Header it will be expanded, thats okay, and wenn i mouseout that will be collapsed, thats perfect...

but wenn i go with the mouse of the expanded DIV ("submenu", by apple style) that will be collapse it too, because the mouseover function, i think the mouseover function is only for the header,thats right?? hwo can i realize that, that if i mouseover also from the submenu, THAN will be collapsed...?

i hope you or anybody understand my bad-english!? =) =(
Reply With Quote
  #4  
Old 08-07-2008, 08:55 AM
ddadmin's Avatar
ddadmin ddadmin is offline
Administrator
 
Join Date: Aug 2004
Posts: 7,627
Thanks: 2
Thanked 639 Times in 629 Posts
Blog Entries: 13
Default

Ah yes. Try the below .js file then in place of what I posted above.
Attached Files
File Type: js ddaccordion.js (11.4 KB, 178 views)
__________________
DD Admin
Reply With Quote
  #5  
Old 08-07-2008, 01:35 PM
zero3 zero3 is offline
New Comer (less than 5 posts)
 
Join Date: Aug 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yeah, thats it. I thank you so much ddadmin.
Reply With Quote
  #6  
Old 08-08-2008, 07:39 PM
blueginko blueginko is offline
Junior Coders
 
Join Date: Aug 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi ddadmin, I need something like zero3.... and can't quite figure it out.

I need the content to reveal when mousing over the header and to hide when the user mouses out. However, there are links in the content so I need it to stay expanded (revealed) while the user is in the content area.

So
expand when mouse over header and content.
Collapse when mouse goes out of header or content.

English is my first language and I still have trouble explaining. I hope you understand and I sure thank you for any assistance. This is a great script!
Reply With Quote
  #7  
Old 08-09-2008, 08:09 AM
ddadmin's Avatar
ddadmin ddadmin is offline
Administrator
 
Join Date: Aug 2004
Posts: 7,627
Thanks: 2
Thanked 639 Times in 629 Posts
Blog Entries: 13
Default

Actually blueginko, the 2nd attached file above should do this already.
__________________
DD Admin
Reply With Quote
  #8  
Old 08-09-2008, 03:07 PM
blueginko blueginko is offline
Junior Coders
 
Join Date: Aug 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think did try that, but when I moved out of the header down into the content area, the content collapsed. Did I need to change the html as well? I've put back the original so that a manager could see the original way it but will (if I get chance) try again tonight. Otherwise it will be Monday, but I will definitely try it again.

Thanks!!
Blueginko
Reply With Quote
  #9  
Old 08-10-2008, 06:08 AM
ddadmin's Avatar
ddadmin ddadmin is offline
Administrator
 
Join Date: Aug 2004
Posts: 7,627
Thanks: 2
Thanked 639 Times in 629 Posts
Blog Entries: 13
Default

Nope, no changes to the HTML should be required. Please post a link to the page on your site that contains the problematic script so we can check it out.
__________________
DD Admin
Reply With Quote
  #10  
Old 08-11-2008, 12:55 AM
blueginko blueginko is offline
Junior Coders
 
Join Date: Aug 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, it's http://www2.creighton.edu/testing/m-...cultyandstaff/.

mouse over the "BlueSuite" button on the upper right of the content area just below the weather.

Thanks so much!!!!
blue
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:37 AM.

Home - Contact Us - Archives - Link to DD - Top 

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.