Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript] Zatrzymanie animacji po najechaniu myszą
php11
post
Post #1





Grupa: Zarejestrowani
Postów: 215
Pomógł: 5
Dołączył: 11.02.2011

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


Moi drodzy,

jak zatrzymać animację, gdy najadę myszą na element?

  1. var slides = document.querySelectorAll('.mojSlider li');
  2. var currentSlide = 0;
  3. var slideInterval = setInterval(nextSlide,3000);
  4.  
  5. function nextSlide(){
  6. slides[currentSlide].className = 'slajd';
  7. currentSlide = (currentSlide+1)%slides.length;
  8. slides[currentSlide].className = 'slajd aktywny';
  9. }


To powinno zadziałać, ale nie potrafię prawidłowo umieścić w moim kodzie
  1. $(function() {
  2. $('marquee').mouseover(function() {
  3. $(this).attr('scrollamount',0);
  4. }).mouseout(function() {
  5. $(this).attr('scrollamount',5);
  6. });
  7. });
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: 20.08.2025 - 20:29