Hello.
I found a cool script to mirror a field input to another input but I need it to mirror to TWO inputs below. Here's the code:
I found a cool script to mirror a field input to another input but I need it to mirror to TWO inputs below. Here's the code:
Code:
<!DOCTYPE html>
<html lang="en-US" class="no-js no-svg">
<head>
<script type='text/javascript' src='http://www.sapotdisenyo.com/wp-includes/js/jquery/jquery.js?ver=1.12.4-wp' id='jquery-core-js'></script>
</head>
<body >
<input id="main" class="form-control" placeholder="Enter some text">
<label>Mirror</label>
<span id="mirror"></span>
2nd Mirror Would go Here:
<span id="mirror2"></span>
<script>
jQuery(function () {
jQuery('[data-toggle="tooltip"]').tooltip();
})
var main = document.getElementById('main');
var mirror = document.getElementById('mirror');
main.addEventListener('input', function(event) {
mirror.innerText = event.target.value.split('').join('');
});
</script>
</body>
</html>