I have this button made in javascript and when it is clicked it opens up a small twitter popup window that allows the user to follow me. Now what I want is for this popup window to close once the person clicks "Follow". I have attached a picture of the popup window so you can get more of an idea. Here is the script for that window that i'm trying to modify.
<script type="text/javascript" charset="utf-8">
window.onload=function(){
twttr.events.bind('follow', function(event) {
var followed_user_id = event.data.user_id;
var followed_screen_name = event.data.screen_name;
//alert('you have followed " '+followed_screen_name+'"');// Uncomment it for the javascript popup to activate
document.getElementById('download').style.display = 'block';
});
twttr.events.bind('unfollow', function(event) {
//alert('Unfollowed now'); // Uncomment it for the javascript popup to activate
document.getElementById('download').style.display = 'none';
});
}
</script>
I don't know how or where to insert the code that makes it close once the follow button is clicked. If you are familiar with this situation I would greatly appreciate any information whatsoever. Thanks in advance :)