I added this around line 100:
<?php
// Add even/odd classes
if($key % 2 || array_search($key, array_keys($links)) % 2) $class .= ' even';
else $class .= ' odd';
?>
I'm not sure why it's not working, though, but here is my feature request...
I added this around line 100:
<?php
// Add even/odd classes
if($key % 2 || array_search($key, array_keys($links)) % 2) $class .= ' even';
else $class .= ' odd';
?>
I'm not sure why it's not working, though, but here is my feature request...
Comments
Comment #1
sarhansg commented+1
Comment #2
sarhansg commentedIs there any way for this module to add Odd/Even classes? The way my menu is designed the odd and even parent links have different background colors. Besides being taxing to CSS them individually, it also isn't practical because each time a new link is added new CSS has to be added.
Any help?
Comment #3
Fidelix commentedsarhansg, you can try to use css3 selectors (nth-child), and make it work on IE6-8 with ie9.js or jquery.
Comment #4
sarhansg commentedThanks Fidelix but what you've described seems beyond my capabilities.
Comment #4.0
sarhansg commentedSyntax Highlighting
Comment #5
mikeegoulding