I'm new to JQuery. I wanted to disable buttons when I click on a button. I tried this method but it is not working. Thanks.
html
<a href="vote.php?qid=<?php echo $qid ?>&val=1" class="like">
<i class="material-icons black-text ">thumb_up</i></a>
<a href="vote.php?qid=<?php echo $qid ?>&val=2" class="dislike">
<i class="material-icons black-text ">thumb_down</i></a>
<a href="vote.php?qid=<?php echo $qid ?>&val=3" class="report">
<i class="material-icons black-text" >report</i></a>
jquery
$(document).ready(function() {
$('.like').on('click' function() {
$('.dislike').prop('disabled',true);
$('.report').attr('disabled','disabled');
});
});