<input id="txt-pickup" type="text"/>
<input id="txt-destination" type="text"/>
<input id="change" type="button" value="Swap"/>
$(document).ready(function (){
$("#change").on('click',function(){
var pickup = $('#txt-pickup').val();
$('#txt-pickup').val($('#txt-destination').val());
$('#txt-destination').val(pickup);
});
});
0 Comments