I have the following code on my site, which when it accesses Twitter\'s API generates it\'s own markup.
I\'m looking to call a JavaScript function on the onCli
Adding a customized Twitter button to your website is a lot easier than you might think.
Tweet
Yes, really, that's all it takes. Give your link some design love and tada! Your very own custom Twitter button.
Opening the Twitter Share Box in a popup window
To show the Twitter Share Box as a popup, simply add some lines of javascript to open the link in a new window. Here's an example using jQuery:
Tweet
Note: This is just an example. You'll probably want to put the javascript code in a .js file and call it on document ready.
$(document).ready(function() {
$('.popup').click(function(event) {
// and so on...
}
});
Setting a default message for the tweet
You can set a default text for the tweet adding a text parameter to the link:
Tweet
Now when your users click on your Tweet link, the message "This is so easy" will appear in the tweet box by default. more..