I have used js for active link,this is working fine for below line
<a href="http://www.google.com" class="list-group-item menu cp_btns" target="blank" ><?php echo $row['title']; ?></a>
But for this below line this is working only for loading time, after load the page it's not working.
<a href="index.php?U=<?php echo $row['title']; ?>" class="list-group-item menu cp_btns" ><?php echo $row['title']; ?></a>
Here my URL is index.php?U=Google
I have used this js code here
<script>
$(document).ready(function(){
$('a.cp_btns').click(function(){
$('a.cp_btns.active').removeClass("active");
$(this).addClass("active");
});
});
</script>
Have there any solution to fix this problem ?