3
need a help. There’s a jQuery event that works the way I want it to. When I click, it executes the action.
$("#SEN").click(function(){
$("#abre").show(); //ou fadeIn
});
My intention is that, on another page, retrieves data from a customer and when I leave checked
in the radio
that performs the action, not only takes by loading the page.
Summary is to load the page and run the radio
selected without user interaction.
I’ve tried that and it won’t:
$("#SEN").bind('onload, change',function(){
$("#abre").show();
});
so tbm:
$('#SEN').on('onload, change',function() {
if (this.checked == true) {
$("#abre").show();
}
});
And with Trigger and nothing :(
$('#SEN').on('onload, change',function() {
if (this.checked == true) {
$("#abre").show();
}
}).trigger("change");
Maybe you’re doing it wrong You can help me?
It would be on page loading the already selected event run
– Thalles Daniel
What is the difficulty? and only put to check if it is checked when loading the page.
– Gabriel Rodrigues
worked like this $('#SEN'). on('onload, change',Function() { if (this.checked == true) { $("#opens"). show(); } }). Trigger("change");
– Thalles Daniel