Jak za pomocą animate zmienić kolor tekstu który jest w tabeli? Funkcja animate wykonuje się po najechaniu na tabeli.
próbowałem:
color: "red"
ale nie działało :)
Jak zrobiłem tak:
$(this).css("color","red");
To działa ale zmienia się od razu bo jest to poza funkcja animate.
<table style=" float:left; margin-left:80px; margin-top: 5px;">
<tr>
<td onclick="window.location='index.html'" style="padding-right: 5px; padding-left: 40px; border-right: solid 2px; border-color: #D4DFEE;">Główna</td>
<td onclick="window.location='index.html'" style="padding-right: 5px; padding-left: 40px; border-right: solid 2px; border-color: #D4DFEE;">Produkty</td>
<td onclick="window.location='index.html'" style="padding-right: 5px; padding-left: 40px; border-right: solid 2px; border-color: #D4DFEE;">Gwarancja</td>
<td onclick="window.location='index.html'" style="padding-right: 5px; padding-left: 40px; border-right: solid 2px; border-color: #D4DFEE;">Serwis</td>
<td onclick="window.location='index.html'" style="padding-right: 5px; padding-left: 40px; border-right: solid 2px; border-color: #D4DFEE;">Kontakt</td>
</tr>
</table>
$("td").mouseover(function() {
$(this).animate({
borderRightWidth: "15px",
paddingLeft: "27px"
}, 200);
$(this).css("cursor","pointer");
}).mouseout(function() {
$(this).animate({
borderRightWidth: "2px",
paddingLeft: "40px"
}, 400);
$(this).css("cursor","auto");
});