Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [CSS][JavaScript]Problem z animate i css
Forum PHP.pl > Forum > Przedszkole
norbert222
Witam
Proszę mi powiedzieć dlaczego gdy wywołam pierwszy kod z css to działa a jeśli już robię przez animate to nie chce ruszyć
  1. $(this).css('backgroundColor', 'red');


drugi kod:
  1. $(this).animate({
  2. backgroundColor: 'red',
  3. }, 300);
Greg0
Cytat z dokumentacji jQuery
Cytat
All animated properties should be animated to a single numeric value, except as noted below; most properties that are non-numeric cannot be animated using basic jQuery functionality (For example, width, height, or left can be animated but background-color cannot be, unless the jQuery.Color() plugin is used).
norbert222
czyli co mam podawać wszystko w postaci np. #fff lub rgba? robiłem już tak i nic nie dało
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.