title: get all the links in a page using jquery
body: <p>I need to get all the links in the page using <code>.each(function(){});</code> in JQuery</p>
  
  <pre><code>&lt;div id="mm"&gt;
      &lt;ul class="mg"&gt;
          &lt;li id="nav_sports"&gt;
              &lt;a href="http://www.google.com" class="atest"&gt;Sports&lt;/a&gt;
              &lt;div id="sports"&gt;
                  &lt;ul&gt;
                      &lt;li&gt;
                          &lt;a href="http://www.dictionay.com"&gt;cricket&lt;/a&gt;
                      &lt;/li&gt;
                  &lt;/ul&gt;
                  &lt;ul id="cont1"&gt;
                      &lt;li style="color:#444444"&gt;
                          &lt;b&gt;Popular&lt;/b&gt;
                      &lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/div&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>