<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
// We bind a new event to our link
$('#click_button').live("click", function(e)
{
var twitter_text = $("#twitter_text").val();
//We tell our browser not to follow that link
e.preventDefault();
//We get the URL of the link
var loc = $(this).attr('href');
//We get the title of the link
var title = encodeURIComponent($(this).attr('title'));
//We trigger a new window with the Twitter dialog, in the middle of the page
window.open('http://twitter.com/share?url=' + loc + '&text=' + twitter_text + '&', 'twitterwindow', 'height=450, width=550, top=' + ($(window).height() / 2 - 225) + ', left=' + $(window).width() / 2 + ', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0');
});
</script> <textarea rows="4" cols="50" id="twitter_text">
At w3schools.com you will learn how to make a website.</textarea> <button type="button" id="click_button">Click Me!</button>This code snippet for share customize text in twitter using jQuery.
