I have a 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 :col-md-12
div 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
});
});
I wanted to create a news link from the database, where the user will click on the title and below the title it will open the respective notice to the link..but this dynamically ... see below the screen where they are the links it brings me the information however unconfigured. because I can not put the hide and show effect on these links and open individually.