add function share , comment button and write comments
This commit is contained in:
parent
2c39774ff7
commit
e3040d99fa
3 changed files with 54 additions and 34 deletions
|
@ -211,6 +211,26 @@
|
|||
$comment.find('.comment-body').show();
|
||||
$comment.find('.bad-comment-body').hide();
|
||||
};
|
||||
|
||||
$("#share-button").click( function() {
|
||||
navigator.clipboard
|
||||
.writeText(window.location.href)
|
||||
.then( () => {
|
||||
alert("Copied link to this post");
|
||||
});
|
||||
});
|
||||
|
||||
$("#write-comments").click( function(event) {
|
||||
event.preventDefault();
|
||||
$("#new-comment").show("slow");
|
||||
$("#write-comments").hide();
|
||||
});
|
||||
|
||||
$('#comment-button').click( function() {
|
||||
$('#comment-section').show();
|
||||
$('#comment-announcement').hide();
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
{% endcompress %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue