gpt4 book ai didi

jquery - 如何使用 Jquery 获取推文?

转载 作者:行者123 更新时间:2023-12-01 01:19:58 25 4
gpt4 key购买 nike

我需要使用 Jquery 显示来自 Twitter 的新推文。

最佳答案

jquery.tweet.js是一个很好用的插件。

启动和运行非常简单,只需下载相关文件并将以下内容添加到您的 html 中(当然,最好将 js 放在外部文件中!)

<script type='text/javascript'>    $(document).ready(function(){        $(".tweet").tweet({            username: "seaofclouds",            join_text: "auto",            avatar_size: 32,            count: 3,            auto_join_text_default: "we said,",             auto_join_text_ed: "we",            auto_join_text_ing: "we were",            auto_join_text_reply: "we replied to",            auto_join_text_url: "we were checking out",            loading_text: "loading tweets..."        });    });</script><div class="tweet"></div>

它带有一些预定义的样式,但很容易添加您自己的样式。

html 输出是一个无序列表,偶数项和奇数项具有不同的类,例如:

<ul class="tweet_list"> <li class="tweet_first tweet_odd">   <span class="tweet_text">[Tweet text]</span>  <span class="tweet_time">about 21 hours ago</span> </li> <li class="tweet_even">  <span class="tweet_text">[Tweet text]</span>  <span class="tweet_time">about 22 hours ago</span> </li></ul>

关于jquery - 如何使用 Jquery 获取推文?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3863252/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com