我无法让以下 if 语句正常工作,有人可以告诉我我做错了什么吗?
<a id='slink' class='trigger' href='#Sports'>Sport</a>
<a id='elink' class='trigger' href='#Entertainment'>Entertainment</a >
<a id='mlink' class='trigger' href='#Military'>Military</a>
<a id='mocklink' class='trigger' href='#MockUp'>MockUps</a>
$('.trigger').on('click',function(){
if ($(this).attr('id') = 'mocklink') {
alert('hey');
});