Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Javascript dropdown navigation
#5
So this is used in conjunction with the get_navigation() template tag?


mvlcek Wrote:
rbboyl Wrote:The dropdown menu uses jquery to give it a sliding/fading effect. I was able to nest the list and still have the menu work.

My revised question is how to add the rel="ddsubmenu1" attribute to the main links that have sub-menu items if GetSmple is generating the menu?

Supposing the uppermost ul has id menu, you should be able to do it with something like this:

Code:
$(function() {
  $('#menu li ul').each(i,ul) {
    $(ul).attr('id','ddsubmenu'+i);
    $(ul).closest('li').find('a:first').attr('rel','ddsubmenu'+i);
  }
});
Reply


Messages In This Thread
Javascript dropdown navigation - by rbboyl - 2011-06-15, 03:15:48
Javascript dropdown navigation - by mvlcek - 2011-06-15, 03:38:34
Javascript dropdown navigation - by rbboyl - 2011-06-15, 03:51:01
Javascript dropdown navigation - by mvlcek - 2011-06-15, 04:02:04
Javascript dropdown navigation - by rbboyl - 2011-06-15, 04:54:42
Javascript dropdown navigation - by mvlcek - 2011-06-15, 05:06:52
Javascript dropdown navigation - by rbboyl - 2011-06-15, 05:46:32



Users browsing this thread: 1 Guest(s)