Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Page & Category Menu Bars (http://forum.bytesforall.com/forumdisplay.php?f=10)
-   -   Give to each link of the menubar a different color. (http://forum.bytesforall.com/showthread.php?t=3762)

paolo-from-italy Oct 7, 2009 10:58 AM

Give to each link of the menubar a different color.
 
Hi!
I'd like to give to each link of the menubar a different color.
How can I do?
Please...!

aechean Oct 7, 2009 01:03 PM

Well, you could insert a custom jQuery javascript to alternate colors on the <ul> of the menu...

You would just have to make your selectors be every nth child = a certain color. Let me see if I can make this happen quick and I'll post it.

*EDIT*
Yeah, so, this will work, as long as you use the correct class selectors for the menu you want to change:

Code:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
       

$(document).ready(function() {
                                                  $("li:eq(0)").css("color","blue");
                                                  $("li:eq(1)").css("color","black");
                                                  $("li:eq(2)").css("color","red");
                                                  });
   

</script>

The correct selector for the theme *should be* 'ul#rmenu2 li'...I think.

paolo-from-italy Oct 7, 2009 01:59 PM

sorry but I don't understand...I'm newbie...
another help is possible?


All times are GMT -6. The time now is 09:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.