2
I have the class that retrieves data from the bank
public function ListAjNot(){
try{
$lernot = "SELECT tit_postjauport, pos_postjauport FROM noticia ";
$listnot = $this->con->Connect()->prepare($lernot);
$listnot->execute();
$retListSelecionada = $listnot->fetch(PDO::FETCH_ASSOC);
echo json_encode($retListSelecionada);
}
catch(PDOException $erro5){
echo 'erro'.$erro5->getMessage();
}
}
}
This class is used by javascript($ajax) to retrieve data in my div :col-md-12
as shown below.
$(document).ready(function(){
$('#col-md-12').empty();
$.ajax({
type:'post', //Defino o método HTTP usado
dataType: 'json', //Defino tipo de retorno
url: 'noticias.class.php', //Defino o arquivo onde serão buscados os dados
});
});
wanted to create a news link from the database, where the user will click on the title and below the title he will open the respective news to the link.. but this in a dynamic way... see below the screen of where the links are he brings me the information but disfigured. because I cannot put the Hide and show effect on these links and open individually.