1
I have the following input
:
<input type="radio" id="isgift0" name="isgift" value="0" class="arredondado" <?php if(Mage::getSingleton('core/session')->getInputMensagem() == 1){echo "checked='checked'"} ?> />
Trying to check he saw php
is not working because the same is not coming checked. Doing this via jQuery
, it is checked correctly, but it takes too long to perform it and ends up affecting the functionality of the page.
Check via jQuery
:
$j(document).ready(function () {
<?php
if(Mage::getSingleton('core/session')->getInputMensagem() == 1) {
?>
$j('#isgift0').prop('checked','checked');
$j('#isgift0').click();
<?php
}
?>
});
I was wondering if you had any way to do that same check, but in a faster way.
Excellent explanation. Thank you so much for your help!
– Matheus Portela