Hello all,

This code acts to add classes to change the colour of a cell in a table.
It does not work in IE

RagScript
----------
<script>
(function($){
    $("td:contains(2), td:contains(1) ").addClass('red');
    $("td:contains(3), td:contains(4) , td:contains(5)").addClass('amber');
    $("td:contains(6), td:contains(7) ").addClass('green');
})(jQuery);
</script>

STYLESHEET
--------------------

div[tags~="matrix"] .red {
color:white;
background-color:#FF0700;}

div[tags~="matrix"] .amber {
color:white;
background-color:#FFCC00;}

div[tags~="matrix"] .green {
color:white;
background-color:#21A113;}

table.twtable {
border-collapse:separate; margin:1.0em 1.0em;}

td { padding-top: 14px; }

.viewer th, .viewer thead td, .twtable th, .twtable thead td {
    background:white;
    color: black;
}


*MTC*
-------
http://dl.dropbox.com/u/1316865/TiddlyWiki/TiddlyWikiTestCases/ragtable.html

*ScreenShots*
------------------
IE screen shot -
http://dl.dropbox.com/u/1316865/TiddlyWiki/TiddlyWikiTestCases/firefox.png
Firefox screen shot -
http://dl.dropbox.com/u/1316865/TiddlyWiki/TiddlyWikiTestCases/firefox.png
Opera same as Firefox -


any help will be highly appreciated

Alex

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to