隐藏的Div中的社交媒体按钮 [英] Social Media buttons inside hidden Div

查看:125
本文介绍了隐藏的Div中的社交媒体按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人能够获得Facebook Like,Twitter Follow和Google +1按钮在Chrome扩展程序中工作。

Has anybody been able to get the Facebook Like, Twitter Follow, and Google +1 buttons to work inside a chrome extension.

我可以获得按钮来显示以及一些功能,但似乎缺少部分。例如,Like按钮不记得如果你喜欢它,它每次显示1的计数。 Twitter不显示正确的关注者,并且在关注文本之后缺少@username。

I can get the buttons to show up, and some functionality, but seem to be missing parts. For instance the Like button doesn't remember if you liked it, it shows the count of 1 every time. Twitter doesn't show the correct number of followers, and is missing the @username after the "Follow" text.

我知道这些扩展名是沙盒。有人找到了这个方法吗?例?代码?

I know the extensions are sandboxed. Has anybody found a way around this? Example? Code?

更新

问题是社交媒体按钮在里面一个隐藏的div(显示:none)。 div使用jQuery的slideToggle来显示和隐藏。默认情况下,div不显示,社交媒体按钮在其上。当我将社交媒体按钮放在不被隐藏的div中时,它们可以正常工作。任何解决方案?

The problem is that the social media buttons are inside a div that is hidden (display: none). The div uses jQuery's slideToggle to show and hide. By default the div is not showing and the social media buttons are on it. When I put the social media buttons in a div that is not hidden they work fine. Any solutions?

问题是社交媒体按钮位于隐藏的div(通过选项卡可以访问的不同显示器)内。有没有办法使它们在没有更新触发事件的z-index的情况下工作?

The problem was that the social media buttons are inside a hidden div (a different display that can be accessed through a tab). Is there any way to make them work without update the z-index on triggered events?

推荐答案

问题解决。我将标记添加到标记页面,并在slideToggle开始之后立即对API脚本进行匿名函数调用。作品完美。

Problem solved. I added the markup to the markup page and made an anonymous function call to the API script immediately after the slideToggle began. Works perfect.

这篇关于隐藏的Div中的社交媒体按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆