title: Change the text of anchor tag on clicking any div
body: <p>I have an list with each item having a different <code>ID</code> . So for single item i have written the HTML part.</p>
  
  <p>The structure is something like</p>
  
  <pre><code>&lt;div id='33496'&gt;
      &lt;div class='event_content'&gt;.....
        &lt;div&gt;......
        &lt;/div&gt;
        .....
      &lt;/div&gt;
  
      &lt;div class='event_content1'&gt;
      ......
      &lt;/div&gt;
  
      &lt;div class='job_inn'&gt;.....&lt;/div&gt;
  
      &lt;div&gt;&lt;a id="show_more"&gt;text&lt;/a&gt;
  &lt;/div&gt;
  
  &lt;div id='33495'&gt;
      &lt;div class='event_content'&gt;.....
        &lt;div&gt;......
        &lt;/div&gt;
        .....
      &lt;/div&gt;
  
      &lt;div class='event_content1'&gt;
      ......
      &lt;/div&gt;
  
      &lt;div class='job_inn'&gt;.....&lt;/div&gt;
  
      &lt;div&gt;&lt;a id="show_more"&gt;text&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>So i want here is if i will click any of the div either <code>event_content1</code> or <code>event_content</code> or <code>job_inn</code> the text of <code>show_more</code> should change how can i do that ??</p>
  
  <p>Here is the code i tried &amp; got the solution....</p>
  
  <pre><code>$(".event_content1,.job_inn,.event_title").unbind('click').click(function(){
          var divid = $(this).attr('data-id');
          var show_more = "#show_more" + divid;   
          var show_less = "#show_less" + divid;
  
      if($(show_more).is( ':visible' )){
              $(this).parent().find('.show_more_link').text('show more');
              $(show_more).toggle('slow');
              $(show_less).toggle('slow');
            } else {
               $(this).parent().find('.show_more_link').text('show less');
               $(show_more).toggle('slow');
               $(show_less).toggle('slow');
            }
      });
  </code></pre>