 <p>You are attaching additional event handlers every time you call <code>.click</code>. That is why it is duplicating.</p> <pre><code>$('a.close-trigger').click(function(){ alert(test); $('#dialog').dialog('close'); }); </code></pre> <p>Pull that code out onto the same level as the other event binding and it should work as expected.</p>