Each articles are located in DIV tag. Want to make each DIV clickable and once i click DIV, dialog box should display with appropriate DVI
values
$add->tbl_article_content
, $add->tbl_article_image
my JS dialog box appear for only 1st DIV. how should i do it for all DIV and pass relevant data.
PHP
<div class="row">
<?php
foreach ($data as $value) {
echo "<div class='col-lg-3'>";
echo "<p id='target'>" . $value->tbl_article_header . "</p>";
echo "</div>";
}
?>
Jquery
$( "#target" ).click(function() {
alert( "relevant DIV database values ??? " );
});