javascript - addthis、isotope 和 nicescroll 合而为一

标签 javascript jquery css jquery-isotope addthis

我有一个 wordpress 模板,其中包含一组来自 addthis 的分享按钮

       <ul class="addthis extra">
            <li class="addthis-hold">
                <div class="addthis_toolbox" addthis:url="<?php the_permalink(); ?>">
                    <a class="addthis_button_compact" href="<?php the_permalink(); ?>"><img src="<?php echo GOODLAYERS_PATH; ?>/images/compact.png" width="102px" height="23" alt="email" /></a>
                    <a class="addthis_button_twitter" href="<?php the_permalink(); ?>"><img src="<?php echo GOODLAYERS_PATH; ?>/images/twitter-addthis.png" width="42" height="23" alt="twitter" /></a>
                    <a class="addthis_button_facebook" href="<?php the_permalink(); ?>"><img src="<?php echo GOODLAYERS_PATH; ?>/images/facebook-addthis.png" width="42" height="23" alt="facebook" /></a>
                </div>
                <script type="text/javascript" src="http://s7.addthis.com/js/300/addthis_widget.js#pubid=xa-51238bfa52ea314a"></script>
            </li>
        </ul>

其次,我在我的元素上绑定(bind)了一个同位素/砌体插件,每个元素上都有一个 addthis 元素。请参见下图:

enter image description here

因此,当我将鼠标悬停在 addthis_button_compact 上时,如果我将鼠标悬停在该按钮下方的某个对象上,它确实会改变定位,但它只会改变顶部:X;位置..

最佳答案

在尝试重绘工具箱、domready 设置等之后……唯一可靠的解决方案是更改为扩展按钮。我能够更改“onmouseover”的位置,但感觉不对。

改变这个:

<a class="addthis_button_compact"><span>Share</span></a>

为此:

<a class="addthis_button_expanded"><span>Share</span></a>

改为显示模态版本,虽然这不是我最初的目标,但结果相当不错。因此,尽管可能不是解决问题的方法,但它是另一种选择。

关于javascript - addthis、isotope 和 nicescroll 合而为一,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16835623/

相关文章:

javascript - 通过javascript点击获取 'for'值

javascript - 如何禁止使用 '!!' 的警告(不是不是)?

javascript - 在 google chrome 浏览器中使用 jquery 增加和减少 iframe 标签内选定/突出显示文本的字体大小

Lightslider jquery 插件中的 Javascript 无法正常工作

javascript - 动态生成带有变量名和字符串的数组

javascript - 当我添加处理程序时,Jquery 提交不起作用。

css - 与绝对定位的 div 重叠的 flexbox 元素的图像和文本(工具提示)

javascript - PHP echo 与浏览器一起工作,而不是与 jQuery 一起工作

html - 如何将输入与多行文本的顶部对齐?

jquery - 嵌套的 Li 元素悬停备用背景颜色