Does anybody are conscious of a method to give a unique ID to every submenu wordpress Creates? By now, Wordpress creates:

<ul class="sub-menu"></ul>

Ideally, I'd want it to generate

<ul class="sub-menu" id="radio"></ul>

To ensure that I'm able to assign another style to every sub menu produced via css.

Any assistance is appreciated.

The easiest method to get Uniuqe CSS around your sub menus is always to produce a WordPress child theme that utilizes either the Twenty Ten Theme or Twenty Eleven Theme as the base theme.

Each child theme will inherit all of the magical code the WordPress team has produced to complete just what you would like.

when you're in the Wordpress-Menu editor (Appearance > Menu) put forth the "Screen Options" situated at the very top upper right and click on it after which look into the "CSS Classes" option.

Then you'll help you can easily see a brand new area labeled CSS Classes. There you can include your class for the Menu.

Hope this can help.

This could require modifying your theme's files. Which theme you utilize determines the way your elements are organized. I'd consider simply using the nth-of-type css selector to create them.

ul:nth-of-type(1) { color: blue; }
ul:nth-of-type(2) { color: red; }
ul:nth-of-type(3) { color: green; }
ul:nth-of-type(4) { color: orange; }

Opt for asking this on what's best at Wordpress theme development questions.

It isn't really the easiest way, however it have been effective for me personally..

    var i =0;
 $('ul.sub-menu').addClass (function(idx) {

     return "item-" + idx;

It appends the course item-, item-1, etc to every sub-menu it finds.