title: Write internal link with AJAX
body: <p>I am trying to write some of my first jquery scripts but I'm having some problem... 
  My page have a long text with lot of internal links (
   <code>&lt;a href="/contents/Foo.htm" class=.internal&gt;Foo&lt;/a&gt;</code>
  ). I'd like that when you click on one of the .internal links, the href path will be opened inside the <code>&lt;div id="article"&gt;</code>.</p>
  
  <pre><code>var InternalLink = function() {
      $(".internal").click(function(){
          var path =  $(this).attr("href");
          $.ajax({
              url: "path",
              success: function(data) {
                  $('#article').html(data);
              }
          });
      });    
  };
  </code></pre>
  
  <p>I wrote the code shown below and it work perfectly but I am trying to generalize the code to every link with internal class:</p>
  
  <pre><code>$("#article_01").click(function(){
      $.ajax({
          url: 'contents/article_01.htm',
          success: function(data) {
              $('#article').html(data);
          }
      });
  });
  </code></pre>