title: Change link of clicked item in div with id - jquery
body: <p>I need to change the link in my div which has <code>&lt;div id="0"&gt;</code> .</p>
  
  <p>My <code>div</code> code:</p>
  
  <pre><code>    &lt;div id="0"&gt;
     &lt;div id="header_color" class="spacing-top context_menu"&gt;
        &lt;div class="row"&gt;
           &lt;div contenteditable="true" class="col-md-12 heading-sm28"&gt;Lets get started on project.&lt;/div&gt;
           &lt;div contenteditable="true" class="col-md-12 smalltxt-center"&gt;Lorem Ipsum is simply dummy text of the test change link.&lt;/div&gt;
           &lt;div class="col-md-12 center context_menu context_link"&gt;&lt;a href="http://google.com" target="_blank" class="btntst-back"&gt;Get in touch&lt;/a&gt;&lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="row"&gt;
           &lt;div contenteditable="true" class="col-md-12 heading-sm28"&gt;Lets get started on project.&lt;/div&gt;
           &lt;div contenteditable="true" class="col-md-12 smalltxt-center"&gt;Lorem Ipsum is simply dummy text of the test change link.&lt;/div&gt;
           &lt;div class="col-md-12 center context_menu context_link"&gt;&lt;a href="http://google.com" target="_blank" class="btntst-back"&gt;Get in touch&lt;/a&gt;&lt;/div&gt;
        &lt;/div&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The command I am trying to use is -</p>
  
  <pre><code>$(id).children().attr("href",'http://example.com');
  </code></pre>
  
  <p>Value of <strong>id</strong> I am getting is - </p>
  
  <pre><code>var id = '#'+this.selectedDivCodesub+' '+".clickedDiv";
  </code></pre>
  
  <p>which is - <code>#0 .clickedDiv</code></p>
  
  <p>I am sure I am doing something wrong while <strong>getting the <code>id</code></strong>. Note that I am using clickedDiv because I am trying to change the address of the clicked link.</p>