Я не уверен, что метод изменения является правильным для использования. Я хочу, чтобы этот флажок был отмечен (отмечен), html текстового поля - var two, и если флажок снят, html текстового поля является var one. Как это сделать?jQuery change of checkbox
<script type="text/javascript">
$(function() {
$('.image').change(function() {
var one='type information here';
var two='type url here';
if($('.information').html=='type information here') {
$('.information').html('type url here');
} else {
$('.information').html('type information here');
}
});
});
</script>
<input type="checkbox" class="image"/>
<textarea class="information">type information here</textarea>
Вам необходимо использовать jsfiddle. Сделайте jsfiddle своим примером в этом, а затем я помогу вам –