esedic
3/10/2015 - 1:42 PM

Twitter Popup Share

Twitter Popup Share

<!DOCTYPE html>
<html> 
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>UIkit Boilerplate</title>
  <meta name="description" content="UIkit Boilerplate">
  <meta name="viewport" content="width=device-width, initial-scale=1">
	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
	<script>
	jQuery(document).ready(function($) {
		$(".twitterShare").click(function(e) {
	var win = window.open($(this).attr("href"), "Twitter", "height=400,width=530");
	if (window.focus) {
		win.focus();
	}
	if (win) {
		e.preventDefault();
	}
});
		
	});
	</script>

</head>
<body>
	<div class="uk-container uk-container-center">
		<a href="http://twitter.com/share/?text=<?php echo urlencode('bla bla bla'); ?>&url=<?php echo urlencode('http://www.thesedays.com'); ?>" target="_blank" class="twitterShare">Share on Twitter</a>
	</div>
</body>
</html>