i want to add blink effect to specific table row based on value contain in row is equal to value in php variable. for example if php variable value is 'ABC' then blink table row containing text 'ABC', dynamically.. i have added css code in head for blink.. but may be php variable is not passing in jquery in below code..how to add blink effect to complete row? any help would be appreciated. Thanks in advance..
<html>
<head>
<title> Blink Row </title>
<style>
.blink {
color: #FF0000;
animation: blinker 1s linear infinite;
}
@keyframes blinker {
50% {
opacity: 0;
}
}
</style>
</head>
<?php
$varName = 'ABC';
echo '
<table id="tb_id" class="table table-striped">
<thead>
<tr bgcolor="#E6E6FA">
<th>Name</th>
<th>Email</th>
<th>Address</th>
</tr>
</thead>';
foreach( $rows as $row ){
echo "
<tr>
<td class='grn'>{$row[0]}</td>
<td>{$row[1]}</td>
<td>{$row[2]}</td>
</tr>";
}
echo '
</table>';
?>
<script src="js/jquery-3.2.1.min.js"></script>
<script src="js/jquery-ui.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#tb_id td.grn').each(function(){
var empName = '<?php echo $varName; ?>';
if ($(this).text() == empName) {
$(this).css('background-color','#080');
}
});
});
</script>
</html>