mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-09-02 21:22:34 +00:00
17 lines
540 B
JavaScript
17 lines
540 B
JavaScript
// Synchronize inputs in the browser preview (not Roll20!)
|
|
$('input[type=text]').on('change', function() {
|
|
$(`input[name=${$(this).attr('name')}]`).val($(this).val());
|
|
});
|
|
|
|
$('input[type=text]').on('change', function() {
|
|
$(`span[name=${$(this).attr('name')}]`).html($(this).val());
|
|
});
|
|
|
|
$('textarea').on('change', function() {
|
|
$(`span[name=${$(this).attr('name')}]`).html($(this).val());
|
|
});
|
|
|
|
$('input[type=checkbox]').on('change', function() {
|
|
$(`input[name=${$(this).attr('name')}]`).prop('checked', $(this).prop('checked'));
|
|
});
|