This JavaScript Works Alone, But Not With Other JavaScript
<p>I got this code from my programmer (outsourcing) :</p>

<pre><code>&lt;script type="text/javascript"&gt;
  $(function(){
     $('#notif-icons &gt; li &gt; a, #top-menu &gt; li &gt; a').click(function() {
         var clicked = $(this).next('.popup-notif');
         $('.popup-notif').not(clicked).fadeOut('fast');
         clicked.slideToggle('fast');
     }).toggle(function(){
        $(document).click(function() {
            $('.popup-notif').fadeOut('fast');
        });
        $('.popup-notif').click(function(e) {
            e.stopPropagation();
        });
     }, function() {
     });
  });
&lt;/script&gt;
</code></pre>

<p>that code works alone in plain HTML, but when I put into my codes, it won't work anymore and I think there's something wrong with that code. for example :</p>

<pre><code>}, function() {
         });
      });
    &lt;/script&gt;
</code></pre>

<p>I have no idea what that empty function() used for... could you guys please help me. because I'm not expert in JavaScript things... thanks!</p>

<p>**Update : this code used to display notifications. once "notif-icons" clicked, ".popup-notif" shows up and vice versa.</p>
