1
我在ASP.Net應用程序中有一個ShareThis小部件,點擊它後彈出窗口被啓動,用戶可以輸入消息然後與多個服務共享。我想設置一個更有用的與上下文相關的'罐裝'消息,但是我無法讓這個工作。下面是我的代碼和截圖。使用jQuery改變分享此留言
<div id="ShareDiv"><span class='st_sharethis_large' displayText='ShareThis'></span>
<span id="button_1" class='st_facebook_large' displayText='Facebook'></span>
<span class='st_twitter_large' displayText='Tweet'></span>
<span class='st_googleplus_large' displayText='Google +'></span>
<span class='st_email_large' displayText='Email'></span></div>
<script type="text/javascript"> var switchTo5x = true; </script>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"> </script>
<script type="text/javascript"> stLight.options({ publisher: "ur-ae96e1f4-e30b-b79b-fb91- 54d133283702" }); </script>
<script>
$(document).ready(function(){
$('#ShareDiv').click(
function(){
$('textarea').val('Some useful canned message');
});
});
</script>