I have this function:
$('.PhoneNumbers').on('keyup focusout', $('input:text[name^="Customers[0].PhoneNumbers"]'), function (e) {
phoneRadioBtns(e);
});
The problem is that when I refresh the page it triggers the keyup event and it executes the function, which is not the desired result. Does anyone know how to correct this?
Does it happen only when you press F5 while inside the input?
(This was the only way I managed to reproduce: try here http://jsfiddle.net/ybuTv/)
One way of solving it is to exclude the F5 button from the event: http://jsfiddle.net/ybuTv/1/