Javascript 通过Ajax调用将twitter follow按钮添加到页面
我的Ajax调用正在生成以下html,该html创建了一个twitter follow按钮,并将其附加到页面上的一个div中Javascript 通过Ajax调用将twitter follow按钮添加到页面,javascript,jquery,ajax,asp.net-mvc-4,twitter,Javascript,Jquery,Ajax,Asp.net Mvc 4,Twitter,我的Ajax调用正在生成以下html,该html创建了一个twitter follow按钮,并将其附加到页面上的一个div中 <a href="https://twitter.com/@Model.TwitterName" id='followbutton' class="twitter-follow-button" data-show-count="true" data-size="medium">Follow @@@Model.TwitterName</a> 我
<a href="https://twitter.com/@Model.TwitterName" id='followbutton' class="twitter-follow-button" data-show-count="true" data-size="medium">Follow @@@Model.TwitterName</a>
我不知道如何让twitter小部件脚本用于附加内容。如果在加载DOM时代码就在那里,那么它就可以工作
twttr.widgets.load()
重新加载页面上html的脚本
<a href="https://twitter.com/@Model.TwitterName" id='followbutton' class="twitter-follow-button" data-show-count="true" data-size="medium">Follow @@@Model.TwitterName</a>