Try
$("a[rel]").live("click", function(){ ....
or you could try .. but I donβt think that would solve it.
$("a[rel]").live("change", function(){ ....
And make sure it is ready in the DOM.
You can try to prevent the default action, perhaps this interferes with your first click.
$("a[rel]").bind("click", function(event){ event.preventDefault(); // <---------^^ $(".close_button_change_password").attr('id','change_password_'+$(this).attr('id')); $(this).overlay({ // disable this for modal dialog-type of overlays closeOnClick: true, mask: { color: '#fff', loadSpeed: 200, opacity: 0.8 } }); });
source share