使用https://twitter.com/intent/user?user_id=删除按钮样式
Using https://twitter.com/intent/user?user_id= for the follow button remove button styling
我一直在遵循https://dev.twitter.com/docs/intents#follow-intent上的web意图文档,其中描述了链接需要如下:
intent/user?screen_name=xxx
但最好
intent/user?user_id=xxx
使用第一个示例显示样式twitter按钮,但使用user_id不会。
使用screen_name<a href="https://twitter.com/intent/user?screen_name=twitterapi"
class="twitter-follow-button" data-show-count="false" data-size="large">
Follow@twitterapi</a>
使用user_id <a href="https://twitter.com/intent/user?user_id=6253282"
class="twitter-follow- button" data-show-count="false"
data-size="large">Follow @twitterapi</a>
是否有一种方法来样式按钮,如果使用user_id而不是screen_name
是。你可以设置使用。split()方法上的href值分割"?",或者split("?")。
然后写if和else if语句。一个以屏幕名开始,另一个以用户名开始,然后可以使用jQuery的.attr()应用样式,以应用样式表中定义的类。
这回答你的问题了吗?
相关文章:
- 如何将HTML id分配给元素,以及如何将JavaScript应用于元素
- difference between '$(<%= DDL.ID %>) & $('
- 使用Javascript获取所选选项ID
- 根据id将json数组组合为一个json数组
- 是否有一个JS/jQuery函数可以获取某个类的每个元素的ID
- 对id以某个字符串开头的元素进行计数
- 如果元素's的ID以数字开头
- 通过id和class属性获取元素
- 根据选项卡内部的文本链接中的哈希ID动态选择jqueryUI选项卡
- 使用当前日期生成随机id
- Javascript-ID冲突的几率
- Href:当前DIV中的目标ID
- 无法获取属性'Id'使用Knockout.js的未定义或空引用API
- Javascript复选框函数:;缺少:在属性id之后"
- Twitter引导程序Typeahead-Id&标签
- 如何与特定ID交谈
- chart.series[id].remove()无法刷新高位图表/高位股票中其他系列的图例属性
- 如何在速度模板中获取LiferayPortlet实例id
- WordPress Ajax Call -- WordPress User ID
- 会话节点.js + 护照.js + Redis,按 user.id 存储会话