2
I have a select
. I need to get the value of the attribute data-idconta
when the page is loaded and also when the select is changed.
I’m trying to:
$(document).ready(function() {
$('#formaEntrada').on('ready change', function() {
var IDConta = $("#formaEntrada option:selected").attr('data-idconta');
$("#contaBancaria").val(IDConta)
});
});
I’ve tried: ready, load, onload, live...
But to no avail.
The event
change
execute when the page is loaded?– Woss