Inline event handlers can't be disabled by jQuery's unbind()
, you'll need to change the inline handler and add whatever code you need :
$(document).ready(function() {
var myOnclick = $("[id$='remove']").attr('onclick');
$("[id$='remove']").attr('onclick', 'if (confirm("Continue")) ' + myOnclick);
});
Be aware that your selector could match more than one element, and then you'd need to iterate.
EDIT:
Or if there's more than one element:
$(document).ready(function() {
$("[id$='remove']").each(function(i, ele) {
$(ele).attr('onclick', 'if (confirm("Continue")) ' + $(ele).attr('onclick');
});
});