我有一个 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 元素。请参见下图:
因此,当我将鼠标悬停在 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/