 <p>You have to make sure that your a link is in the DOM when your <code>on('click')</code> code is executed. </p> <p>The jQuery function <code>on()</code> will attach an event handler to all jQuery object contained in <code>$("a[name='lnkViews']")</code> but if there is no element matching <code>"a[name='lnkViews']"</code> in your DOM when <code>$("a[name='lnkViews']").on()</code> is executed no handler will be attached.</p> <p>To fix this you could do :</p> <pre><code>var $a = $('&lt;a name="lnkViews"&gt;' + title+ '&lt;/a&gt;'); $a.on("click", function (e) { }); //adding $a in your DOM with element.append($a); for exemple </code></pre> <p>You could also wait that your page is loaded before executing <code>$("a[name='lnkViews']").on()</code> by doing this :</p> <pre><code>$(function() { $("a[name='lnkViews']").on("click", function (e) { }); }); </code></pre> <p>Regards</p>