which is the correct way to pass element_old to the element.change function?
$('body').on('click', 'input', function(){
element = $(this);
element_old = element.val();
element.change( function(element_old){
if($(this).val() != element_old){ show button}
else{ hide button }
})
});
I want to show a button only if the input value has changed from its original value.