title: jQuery how to set click on href in the div?
body: <p>Good day,</p>
  
  <p>I want to set click event on every anchor element in my div container. Here is an example what I want to do:</p>
  
  <pre><code>---HTML---
  &lt;div id="my-container"&gt;
      &lt;a href="page1.html"&gt;page1&lt;/a&gt;
      &lt;a href="page2.html"&gt;page2&lt;/a&gt;
      &lt;a href="page3.html"&gt;page3&lt;/a&gt;
  &lt;/div&gt;
  
  ---- jQuery ----
  $("#my-container a").click(function() {
      var link = $(this).attr("href");
      $("#my-container").load(link);
  });
  </code></pre>
  
  <p>What I want to do is to let me handle loading event of href clicks and load it to the same container. And this is must done <strong>without id, class</strong> attributes which aren't available for that hrefs. The problem is in this: <strong>$("#my-container a")</strong>. Any help would be appreciated! Thanks</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>People doesn't seem to get right what I wanted to ask. I repeat myself again. <strong>$("#my-container a")</strong> &lt;---- doesn't add click events on href anchors. So how I can set click event?</p>