Mam taki kod w sekcji head:
  1. $(document).ready(function(){
  2. $("#top_menu li a").hover(function(){$(this).fadeOut(200);$(this).fadeIn(200);});
  3. $("button").click(function () {
  4. $("p").slideToggle("slow");
  5. });
  6. });
i teraz problem:
w takim układzie działa ta pierwsza funkcja - odpowiada za migania linka.
Ta 2ga z buttonem nie działa.
Po usunięciu funkcji od linków działa ta z buttonem :/

Jak to zrobić, żeby działały obydwie?

Kod nagłówka:
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <meta name="Description" content="Opis strony" />
  5. <meta name="Keywords" content="Słowa kluczowe" />
  6. <meta name="Author" content="http://www.woomedia.com" />
  7. <title>A to tam</title>
  8. <link href="<?php echo $BASEURL; ?>css/style.css" rel="stylesheet" type="text/css" media="all" />
  9. <!--[if IE]><link rel="stylesheet" type="text/css" href="<?php echo $BASEURL; ?>css/style_ie.css">
  10. <![endif]-->
  11. <script type="text/javascript" src="<?php echo $BASEURL; ?>swfobject.js"></script>
  12. <script type="text/javascript" src="<?php echo $BASEURL; ?>js/pngfix.js"></script>
  13. <script type="text/javascript" src="<?php echo $BASEURL; ?>js/jquery.js"></script>
  14. <script type="text/javascript">
  15. $(document).ready(function(){
  16. $("#top_menu li a").hover(function(){$(this).fadeOut(200);$(this).fadeIn(200);});
  17. $("button").click(function () {
  18. $("p").slideToggle("slow");
  19. });
  20. });
  21. </head>