Custom attributes for nav() function

Is it possible to add custom attributes to the html output of the nav() helper (for example, to specify custom li classes)?

Your input to nav can specify attributes, but only for the sub-navigation lists.

Exactly what kind of attributes were you trying to add to the output, something like the same class for every li, or something that would vary between the list items?

For example, using the sample output from the documentation page, I wanted to take this:

<ul class="navigation">
<li class="nav-items current">
  <a href="">Items</a></li>
<li class="nav-exhibits">
  <a href="">Exhibits</a></li>

... and do something like this:

<ul class="navigation" data-role="listview" data-theme="g">
<li class="nav-items current ui-btn-current" data-role="page">
  <a href="">Items</a></li>
<li class="nav-exhibits" data-type="page">
  <a href="">Exhibits</a></li>

I'm not sure this is exactly what I was working on as I moved in a slightly different direction and forget some of the specifics, honestly.

But the general idea was to use some of the conventions from jQueryMobile to accomplish something within that framework. I just forget what it was at the moment.

I think this is another candidate for a total replacement of the function in your theme, unfortunately.

nav() doesn't really have any entry points for outside code, apart from changing the nav elements themselves.