I have the following code,
<ul class="post-buttons">
<li>
<a class="button icon-button thank-icon" title="Thank this post" href="./thank.php?f=12&p=249224"></a>
</li>
</ul>
and on my javascript I have the following,
var ThankButton = $('div.thank-icon > a').attr('href');
console.log(ThankButton);
but on console log I get ThankButton not defined, what I'm doing wrong here?