<script type="text/javascript">
$("div #search_ayat_div").click(function(){
var link1='?verse=';
var link2=$(this).html();
link=link1.concat(link2);
link=link.replace(":","/");
window.location.replace(link);
});
$("div #bookmark").click(function(){
var messageid = $(this).parent().children("#search_ayat_div").html();
var div_id=$(this).attr('id');
$.post("command.php",{
command:'bookmark',
verse:messageid
},function(result){
if(result=='yes'){
$(this).css({
"border":"medium solid #FF0000"
});
alert("Successfully Bookmarked");
}
if(result=='no'){
alert("Already Bookmarked");
}
});
});
</script>
Here at line 17 $(this) is not working. Remember there multiple #bookmark div in the page.
is there any solution.
thank u