954,585 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

A List Script?

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?

SCRAWL
Newbie Poster
7 posts since Sep 2009
Reputation Points: 10
Solved Threads: 0
 

I'd use jQuery to simply sort the list...
Remember to include jquery.js before this script... (and please edit and add to it...)

$(function(){
   $('a.show#red').click(function(){ /*When a link with the class show, id red is clicked...*/
    showColor('#fffccbb'); //Show color (color value (in style attribute);
   });
   $('a.show#orange').click(function(){ //Same, but for orange.
      showColor('#eeffcc');
   });

    
});

function showColor(color){
$('.content li').hide(); //Hide all li's in the class content
$('.content li[style^="color: '+color+'"]').show('slow'); /*Fade in the li with the color specified.*/
}
codejoust
Junior Poster
180 posts since Jul 2009
Reputation Points: 18
Solved Threads: 21
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: