What is the appropriate way to use jQuery toggle() function in a WordPress post to show/hide a Twitter "Tweet" button?
The problem I am encountering is when I put the code in my content-post.php, the toggle feature and tweet functionality only work on the first (most recent) post in the stream. How would I go about putting this in the Wordpress loop?
Right now, I am including this code my content-post.php file:
<?php if (!is_singular()) { require('post_buttons.php'); }?>
The above code includes the Tweet button from another file with this toggle code:
<script>
jQuery(document).ready(function() {
jQuery('#social_trigger').click(function() {
jQuery('#tweet_button').toggle();
});
});
</script>
