title: How to check html element with specific attribute value is present or not
body: <p>How to check whether an element with specific attribute value is present inside a div tag.</p>
  
  <p>For example,</p>
  
  <pre><code>&lt;div id='testdiv'&gt;
      &lt;a dir='hello' href='#' &gt;&lt;/a&gt;
  &lt;/div&gt;
  &lt;input type='button' id='btn' /&gt;
  </code></pre>
  
  <p>Here is my Jquery.</p>
  
  <pre><code>$('#btn').click(function(){
     if(/*Here I need the condition to check whether, `a` tag with attribute `dir` with value `hello` is present inside `div` */)
     {
         alert(present);
     }
  }
  </code></pre>
  
  <p>Please advice dear friends as I am beginner in jQuery. Thanks.</p>