Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] How to include a css menu with links to specific classes?
#5
mikeh Wrote:It looks like he wants class="link-page-slug" on each anchor tag.
I don't think Mvlckes plugins do this without modification.

Hmmm... Looks like something that could be accomplished with a bit of jQuery.

As long as one keeps the menu-text name simple and the classes identical to those names, something like:

$("#menu a").attr('class', function() {
return this.text; });

would work.

http://jsfiddle.net/SZXfF/3/

There's undoubtedly a way to set the class attribute based on the parent <li> class (which Mvlcke's plugin automatically generates based on the page slug) but that would require someone who actually knows jQuery.
Reply


Messages In This Thread
[SOLVED] How to include a css menu with links to specific classes? - by Cary - 2011-12-18, 07:41:47



Users browsing this thread: 2 Guest(s)