![]() |
|
Article Options |
Alternating rows without relying on PHP
Michael Morris
Join Date: Nov 2003
Posts: 774
Employee of Digital Media Graphix of Knoxville TN, currently developing a new framework / CMS Knoxville TN
by
![]() Here's a way to alter row colors using vbulletin's template engine without using any outside functions. At the beginning of your rowbit template place the following code.
Now for each row that you need to have alternate colors place the following code where the class name would go.
Below is a complete example using one of the forumbit templates.
No members have liked this post.
|
||||||||||||
Views: 7306
|
Comments |
#2
|
||||
|
||||
Now THAT is nice. Great work, I can definitely use this in some of my designs.
No members have liked this post.
|
#3
|
|||
|
|||
Wow. Thanks.. So much easier than what I had planned...
![]() Works very well with modules from vBadvanced, too. I modified the news.php file to be a comments system, and now it looks really nice! Thanks! No members have liked this post.
|
#4
|
||||
|
||||
Thanks.
No members have liked this post.
|
#5
|
||||
|
||||
Great! Thanks!
__________________
موقع اخبار مصر واخبار الرياضة والدولار في دليل مصر No members have liked this post.
|
#6
|
|||
|
|||
Why would you not want to rely on the built-in switcher?
__________________
I can no longer support any of my hacks. Please do not contact me for that. Feel free to create and post new versions of my hacks, as long as you give me credit for the original work. No members have liked this post.
|
#7
|
|||
|
|||
You can also do it via Javascript if you have a framework like jQuery or Prototype installed:
$("tr: odd").addCLass('altRow'); (remove the space between the : and the o) No members have liked this post.
|
![]() |
«
Previous Article
|
Next Article
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Article Options | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 18:05.