PDA

View Full Version : Help with Smooth Navigational Menu



pbojork
01-02-2009, 09:53 PM
1) Script Title: Smooth Navigational Menu (v1.01)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddsmoothmenu.htm

3) Describe problem: I am trying to remove the arrow image that appears on the main level navigation. When I remove the code from the .js file, it causes that entire dropdown action to no longer work. It does, however, work in removing the arrows but at the cost of the functionality. Help please?

Thanks!

Nile
01-02-2009, 10:23 PM
Find the highlighted and remove:


buildmenu:function($, setting){
var smoothmenu=ddsmoothmenu
var $mainmenu=$("#"+setting.mainmenuid+">ul") //reference main menu UL
var $headers=$mainmenu.find("ul").parent()
$headers.each(function(i){
var $curobj=$(this).css({zIndex: 100-i}) //reference current LI header
var $subul=$(this).find('ul:eq(0)').css({display:'block'})
this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()}
this.istopheader=$curobj.parents("ul").length==1? true : false //is top level header?
$subul.css({top:this.istopheader? this._dimensions.h+"px" : 0})
$curobj.children("a:eq(0)").css(this.istopheader? {paddingRight: smoothmenu.arrowimages.down[2]} : {}).append( //add arrow images
'<img src="'+ (this.istopheader? smoothmenu.arrowimages.down[1] : smoothmenu.arrowimages.right[1])
+'" class="' + (this.istopheader? smoothmenu.arrowimages.down[0] : smoothmenu.arrowimages.right[0])
+ '" style="border:0;" />'

ddadmin
01-02-2009, 10:38 PM
Also, this question has been answered before. Please do a search first in the future: http://www.dynamicdrive.com/forums/showthread.php?t=40013

pbojork
01-06-2009, 10:58 PM
Thanks so much for your help!!

Nile
01-06-2009, 10:58 PM
Glad to help you pbojork. And your welcome. :D
It seems your topic is solved... Please set the status to resolved.. To do this:
Go to your first post ->
Edit your first post ->
Click "Go Advanced" ->
Then in the drop down next to the title, select "RESOLVED"

pbojork
01-07-2009, 12:20 AM
Actually one more question...

Would you happen to know how the text for the main menu can be centred in its own section?

Thanks!