Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Dwa jQuery z użyciem <li> = konflikt
szmidt344
post
Post #1





Grupa: Zarejestrowani
Postów: 18
Pomógł: 0
Dołączył: 15.03.2009

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


Witam,
Mam 2 skrypty jquery, które jeden to menu z użyciem tabeli <li> i drugi to slider również z użyciem <li>
Kiedy menu zaczyna działać, to slider też, ale przejmuje funkcję menu i obrazki zaczynają się rozciągać i chować po najechaniu.

Próbowałem z class ale to nie pomaga. Co zrobić?

Pozdrawiam
Go to the top of the page
+Quote Post
buliq
post
Post #2





Grupa: Zarejestrowani
Postów: 559
Pomógł: 93
Dołączył: 4.03.2008
Skąd: Olsztyn

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


Zacznij od pokazania kodu
Go to the top of the page
+Quote Post
szmidt344
post
Post #3





Grupa: Zarejestrowani
Postów: 18
Pomógł: 0
Dołączył: 15.03.2009

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



  1. <link rel="stylesheet" type="text/css" href="css/default.css" />
  2. <link rel="stylesheet" href="animated-menu.css"/>
  3.  
  4. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js?ver=3.2.1" type="text/javascript"></script>
  5. <script src="jquery.easing.1.3.js" type="text/javascript"></script>
  6. <script src="animated-menu.js" type="text/javascript"></script>
  7.  
  8.  
  9. <script src="js/jquery.roundabout.js"></script>
  10.  
  11. <script>
  12.  
  13. $(document).ready(function() {
  14. $(".ul2").roundabout({
  15. autoplay: true,
  16. autoplayDuration: 5000,
  17. autoplayPauseOnHover: true
  18. });
  19. });
  20. </script>
  21. </head>
  22. <body style="background-image:url('images/dark_wood.png'); background-repeat:repeat-all;">
  23.  
  24. <ul class="menus" style="width: 800px; margin-left: auto; margin-right: auto; margin-top:10px;">
  25. <li class="green">
  26. <p><a href="#">Home</a></p>
  27. <p class="subtext">The front page</p>
  28. </li>
  29. <li class="yellow">
  30. <p><a href="#">About</a></p>
  31. <p class="subtext">More info</p>
  32. </li>
  33. <li class="red">
  34. <p><a href="#">Contact</a></p>
  35. <p class="subtext">Get in touch</p>
  36. </li>
  37. <li class="blue">
  38. <p><a href="#">Submit</a></p>
  39. <p class="subtext">Send us your stuff!</p>
  40. </li>
  41. <li class="purple">
  42. <p><a href="#">Terms</a></p>
  43. <p class="subtext">Legal things</p>
  44. </li>
  45. </ul>
  46.  
  47. <center><div><ul class="ul2" >
  48. <li><img width="100%" height="100%"src="images/1.png"/></li>
  49. <li><img width="100%" height="100%"src="images/2.png"/></li>
  50. <li><img width="100%" height="100%"src="images/3.png"/></li>
  51. <li><img width="100%" height="100%"src="images/4.png"/></li>
  52. <li><img width="100%" height="100%"src="images/5.png"/></li>
  53. <li><img width="100%" height="100%"src="images/6.png"/></li>
  54. </ul></div>
  55. </center>

Go to the top of the page
+Quote Post
buliq
post
Post #4





Grupa: Zarejestrowani
Postów: 559
Pomógł: 93
Dołączył: 4.03.2008
Skąd: Olsztyn

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


Ok, pokazałeś kod dla slidera, ale tutaj wróżek nie ma, więc pokaż jeszcze kod dla menu (tj chyba plik animated-menu.js)
Go to the top of the page
+Quote Post
szmidt344
post
Post #5





Grupa: Zarejestrowani
Postów: 18
Pomógł: 0
Dołączył: 15.03.2009

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


przepraszam

  1. $(document).ready(function(){
  2.  
  3. //Fix Errors - <a href="http://www.learningjquery.com/2009/01/quick-tip-prevent-animation-queue-buildup/" target="_blank">http://www.learningjquery.com/2009/01/quic...-queue-buildup/</a>
  4.  
  5. //Remove outline from links
  6. $("a").click(function(){
  7. $(this).blur();
  8. });
  9.  
  10. //When mouse rolls over
  11. $("li").mouseover(function(){
  12. $(this).stop().animate({height:'150px'},{queue:false, duration:600, easing: 'easeOutBounce'})
  13. });
  14.  
  15. //When mouse is removed
  16. $("li").mouseout(function(){
  17. $(this).stop().animate({height:'50px'},{queue:false, duration:600, easing: 'easeOutBounce'})
  18. });
  19.  
  20. });
Go to the top of the page
+Quote Post
buliq
post
Post #6





Grupa: Zarejestrowani
Postów: 559
Pomógł: 93
Dołączył: 4.03.2008
Skąd: Olsztyn

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


I tutaj masz problem, w pierwszym kodzie, slider przypisujesz po klasie, natomiast menu przypisujesz po tagu( li). Popraw tutaj li na ul.menus li
Go to the top of the page
+Quote Post
szmidt344
post
Post #7





Grupa: Zarejestrowani
Postów: 18
Pomógł: 0
Dołączył: 15.03.2009

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


Pięknie dziękuję (IMG:style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 23.08.2025 - 06:50