jQuery allows you to bind multiple click event handlers. You will need to unbind the previous click event handler using .unbind
before adding the second one (or both will fire, as you experienced):
$("a").unbind("click");
So your code could read:
$('.inputWithReplace').focus(function(){
$("a").unbind("click").click(function(){
$('.inputWithReplace').val($(this).html());
});
});
Chris Pebble
2009-10-01 21:46:02