I need to do a check before changing html elements, I tried that way but it did not work, it does not go into if under any circumstances.
<script>
if("<?php empty($usuario_pesquisado->getArea()->getNome()) ?>")
{
$('#area_item').css("opacity", 0.4);
}
if("<?php empty($usuario_pesquisado->getFormacao()) ?>")
{
$('#formacao_item').css("opacity", 0.4);
}
</script>