I have these two javascript , which I must place in several pages.
How can I unify them in the same js ? if it is possible such a thing. The reason for wanting to unify it is only due to the fact that both js execute within themselves the function "copyData ();" and I do not think it's a good practice to I've done it.
<script type="text/jscript">
$(".NHC").on('change' ,function(){
copyData();
});
</script>
<script type="text/jscript">
$(document).on('click','input[type="image"]',function(ev)
{
if (!$(ev.target).is('#ib_check_horario')) {
copyData();
}
});
</script>