title: jQuery if Clicked
body: <p>I'm having trouble getting the following if statement to work, could some please tell me what i'm doing wrong?</p>
  
  <pre><code>&lt;a id='slink' class='trigger' href='#Sports'&gt;Sport&lt;/a&gt;
  &lt;a id='elink' class='trigger'  href='#Entertainment'&gt;Entertainment&lt;/a &gt;
  &lt;a id='mlink' class='trigger' href='#Military'&gt;Military&lt;/a&gt;
  &lt;a id='mocklink' class='trigger' href='#MockUp'&gt;MockUps&lt;/a&gt;
  
  
  
  $('.trigger').on('click',function(){
    if ($(this).attr('id') = 'mocklink') {
   alert('hey');
  });
  </code></pre>