A List Script?

Reply

Join Date: Sep 2009
Posts: 7
Reputation: SCRAWL is an unknown quantity at this point 
Solved Threads: 0
SCRAWL SCRAWL is offline Offline
Newbie Poster

A List Script?

 
0
  #1
Sep 15th, 2009
Over on my site, I have a list of PS3 and Xbox 360 exclusive games:

http://scrawlfx.com/ps3-360-exclusives

However, each item in the list is colored differently depending on whether it's solely exclusive to the console, exclusive to the console but has a PC version, or exclusive to PS3 or 360 but then also has a Wii or PS2 version.

I'm looking for a list script that will allow me to put this list in and then allow sorting options to only show those colored in red, or only show those colored in purple, etc.

Can you guys lend me a hand?
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 178
Reputation: codejoust is an unknown quantity at this point 
Solved Threads: 18
codejoust's Avatar
codejoust codejoust is offline Offline
Junior Poster

Re: A List Script?

 
0
  #2
Sep 15th, 2009
I'd use jQuery to simply sort the list...
Remember to include jquery.js before this script... (and please edit and add to it...)
  1. $(function(){
  2. $('a.show#red').click(function(){ /*When a link with the class show, id red is clicked...*/
  3. showColor('#fffccbb'); //Show color (color value (in style attribute);
  4. });
  5. $('a.show#orange').click(function(){ //Same, but for orange.
  6. showColor('#eeffcc');
  7. });
  8.  
  9.  
  10. });
  11.  
  12. function showColor(color){
  13. $('.content li').hide(); //Hide all li's in the class content
  14. $('.content li[style^="color: '+color+'"]').show('slow'); /*Fade in the li with the color specified.*/
  15. }
Reply With Quote Quick reply to this message  
Reply

Tags
list

Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC