Код: Выделить всё
Voorgrond
Achtergrond
Stel kleur in
Voorbeeld tekst
$(document).ready(function () {
$("#btnKnop1").on('click', function () {
if ($('#txtElement3').is(':checked')) {
var txtElement = $('#txtElement').val()
$('#divResult').css('color', txtElement)
} if ($('txtelement2').is(':checked')) {
var txtElement = $('#txtElement').val()
$('#divResult').css('background-color', txtElement)
}
})
})
How to change the div color, and background color when radio button is checked and on button click?
Источник: https://stackoverflow.com/questions/781 ... o-i-change
Мобильная версия