Using a JSfiddle I found online I am displaying a numeric keypad. ATM the keypad appears and disappears as the user clicks the input button.
I would like to remove this feature from the script code, allowing the keypad to be visible at all times, but am unsure which part to remove from the code:
<script>
$(document).ready(function () {
$('#myInput').click(function () {
$('#n_keypad').fadeToggle('fast');
});
$('.done').click(function () {
$('#n_keypad').hide('fast');
});
$('.numero').click(function () {
if (!isNaN($('#myInput').val())) {
if (parseInt($('#myInput').val()) == 0) {
$('#myInput').val($(this).text());
} else {
$('#myInput').val($('#myInput').val() + $(this).text());
}
}
});
$('.neg').click(function () {
if (!isNaN($('#myInput').val()) && $('#myInput').val().length > 0) {
if (parseInt($('#myInput').val()) > 0) {
$('#myInput').val(parseInt($('#myInput').val()) - 1);
}
}
});
$('.pos').click(function () {
if (!isNaN($('#myInput').val()) && $('#myInput').val().length > 0) {
$('#myInput').val(parseInt($('#myInput').val()) + 1);
}
});
$('.del').click(function () {
$('#myInput').val($('#myInput').val().substring(0, $('#myInput').val().length - 1));
});
$('.clear').click(function () {
$('#myInput').val('');
});
$('.zero').click(function () {
if (!isNaN($('#myInput').val())) {
if (parseInt($('#myInput').val()) != 0) {
$('#myInput').val($('#myInput').val() + $(this).text());
}
}
});
});
</script>
UPDATE Also, the keypad appears on the left, how can I align it to the right. I dont see any ref to alignment in the code?