Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [CSS][JavaScript]Problem z animate i css
-norbert222-
post
Post #1





Goście







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);
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 3)
Greg0
post
Post #2





Grupa: Zarejestrowani
Postów: 264
Pomógł: 54
Dołączył: 31.08.2007
Skąd: Tychy

Ostrzeżenie: (0%)
-----


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).


Ten post edytował Greg0 26.04.2014, 13:43:06
Go to the top of the page
+Quote Post
-norbert222-
post
Post #3





Goście







czyli co mam podawać wszystko w postaci np. #fff lub rgba? robiłem już tak i nic nie dało
Go to the top of the page
+Quote Post
Turson
post
Post #4





Grupa: Zarejestrowani
Postów: 4 291
Pomógł: 829
Dołączył: 14.02.2009
Skąd: łódź

Ostrzeżenie: (0%)
-----


http://www.bitstorm.org/jquery/color-animation/
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 15:43