PHP/HTML Body Code.
<?php
$hasCode = 'Bluecore';
?>
<a class="sns popup_twitter" href="https://twitter.com/share?hashtags=<?php echo $hasCode; ?>"><span>twitter</span></a>
--------------------------------------------------------
Javascript/jQuery Code:
<script type="text/javascript">
jQuery(document).ready(function($) {
$('.popup_twitter').click(function(event) {
var width = 575,
height = 400,
left = ($(window).width() - width) / 2,
top = ($(window).height() - height) / 2,
url = this.href,
opts = 'status=1' +
',width=' + width +
',height=' + height +
',top=' + top +
',left=' + left;
window.open(url, 'twitter', opts);
return false;
});
});
</script>
0 comments:
Post a Comment