Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有另一种方法可以做到这一点。如果我删除 display:none (我不想这样做),它会起作用,但并非一直如此。
我正在尝试从 addthis 小部件中获取共享计数,该小部件将位于我网站的隐藏区域中,并在另一个元素中输出该计数。
http://jsfiddle.net/agileapricot/TpV28/
代替
$("#addthis_counter").text();
经过
$("#addthis_counter").html();
这有帮助吗?
获取 counter 元素的内容
html()
功能和
split(" ")[1];
字符串来得到你想要的。