25 lines
683 B
JavaScript
25 lines
683 B
JavaScript
$(function() {
|
|
$("td[colspan=7]").find("p").hide();
|
|
$("table").click(function(event) {
|
|
event.stopPropagation();
|
|
var $target = $(event.target);
|
|
if ( $target.closest("td").attr("colspan") > 1 ) {
|
|
$target.slideUp();
|
|
} else {
|
|
$target.closest("tr").next().find("p").slideToggle();
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
$.each($('td'), function () {
|
|
if ($(this).html().startsWith("Score: 0")) {
|
|
$(this).css({"background-color": "green", "color": "white"});
|
|
}
|
|
else if ($(this).html().startsWith("Score: ")) {
|
|
$(this).css({"background-color": "red", "color": "white"});
|
|
}
|
|
});
|
|
|
|
console.log("CAN I SEE THIS?");
|