Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [js] zmniejszanie diva
Balon
post
Post #1





Grupa: Zarejestrowani
Postów: 422
Pomógł: 0
Dołączył: 14.12.2005
Skąd: Wałbrzych

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


Napisalem taki skrypt sobie... wiem ze jest cos w nim zle ale jestem poczatkujacy w js winksmiley.jpg

  1. <div id="slide" style="background-color: red;" height="30px">kaka<br/></div>
  2.  
  3. <script type="text/javascript">
  4. function $( id )
  5. {
  6. return document.getElementById( id );
  7. }
  8.  
  9. function slideStart()
  10. {
  11. interval = setInterval( 'slide()', 250 );
  12. }
  13.  
  14. function slide()
  15. {
  16. id = $( 'slide' );
  17. if( id.style.height > 0 )
  18. {
  19. id.style.height -= 1;
  20. }
  21. else
  22. {
  23. clearInterval( interval );
  24. }
  25. }
  26.  
  27. onload = slideStart();


w jaki sposob to przeksztalcic zeby dzialalo ?

prosze o pomoc winksmiley.jpg


--------------------
Postura wielka i morda wredna, jestem Balon, kozak z osiedla !
bzdury.pl - Królestwo rozrywki
Go to the top of the page
+Quote Post

Posty w temacie


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: 19.08.2025 - 14:28