Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function agwp_footerarea()
- {
- ?>
- <script type="text/javascript">
- jQuery(document).ready(function( $ ) {
- var commentsDiv = $('#comments');
- if (commentsDiv.length) {
- $(commentsDiv).hide();
- $('<button/>').attr('class', 'toggle-comments').attr('href', '#').html('Kommentare anzeigen <span class="icon_comment"></span>').insertBefore(commentsDiv);
- $('.toggle-comments').on('click', function(e) {
- e.preventDefault();
- $(commentsDiv).toggle('slow', function() {
- var anchor = $('.toggle-comments');
- var anchorText = anchor.html() == 'Kommentare anzeiten <span class="icon_comment"></span>' ? 'Kommentare verbergen <span class="icon_comment"></span>' : 'Kommentare anzeigen <span class="icon_comment"></span>';
- $(anchor).html(anchorText);
- });
- });
- }
- });
- </script>
- <?php
- }
- add_action('wp_footer', 'agwp_footerarea', 100);
Advertisement
Comments
-
- I wanted to send you a quick message to convey my deep appreciation for introducing me to Pastebin. It has revolutionized the way I handle information and collaborate with others. Thank you for this amazing recommendation!
-
- Can you give me an easy-to-understand guide on how to disable comments?!
Add Comment
Please, Sign In to add comment
Advertisement