I know we can use nth (in css3) selectors for this, but it would be great if there was a way to have semantic menu class names based on link text.

It would also work to have id's... or both.

Comments

vivek.addweb’s picture

Issue summary: View changes

You can add jQuery code for semantic menu id based on link text.

jQuery("ul.menu li a").each(function(){
        var link_text = jQuery(this).text();
        link_text = link_text.replace(" ", "");
        jQuery(this).attr("id",link_text);
});

Let me know if you face any query/concern regarding this.

Thanks!

markhalliwell’s picture

Version: 7.x-3.x-dev » 7.x-4.x-dev
Status: Active » Postponed
Related issues: +#1893532: [bootstrap][policy][7.x-3.x] Navigation/Menus
markhalliwell’s picture

Version: 7.x-4.x-dev » 8.x-4.x-dev
Status: Postponed » Closed (won't fix)

This is unlikely to happen.