1
I’m having a little problem with jQuery, I have the following order of Divs:
$(document).on('click', '.btn_salvar_obg_acess_prazo', function() {
var data = $(this).prev('.acess_prazo_date').val();
alert(data);
});
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<span><?php echo $obrigacao_correspondente_nome ?></span>
</div>
<div class="col-md-6">
<input type="text" data-m='<?php echo $m_c ?>' data-a='<?php echo $a_c ?>' data-obg='<?php echo $obrigacao_correspondente ?>' value="<?php echo $data ?>" name="obg_acess_prazo" class="acess_prazo_date datepicker_full form-control">
<hr>
</div>
<div class="col-md-2">
<button class="btn btn-primary btn_salvar_obg_acess_prazo">Salvar</button>
<hr>
</div>
</div>
</div>
I’ve tried with '.find()', '.Parent()', '.Prev()' and still can’t, always results in 'Undefined'.
Post full html output, no php. Please!
– Maurivan
There is only 1 input per
.row
?– Sergio