【问题标题】:Wordpress Fancy box title not showingWordpress 花式框标题未显示
【发布时间】:2014-09-29 16:11:37
【问题描述】:

我正在尝试使用 wordpress 构建网站,我拥有的插件之一是帮助在图像上创建热点(54.165.58.29/dahlia/ 这是页面)。我无法让标题出现在图像的弹出显示中。

这是这里的代码。

$_ = jQuery.noConflict();
$_(document).ready(function() {   
        $_("a[rel=map_gallery]").fancybox({
            'transitionIn'      : 'none',
            'transitionOut'     : 'none',
            'titlePosition'     : 'inside',
            'titleFormat' : function(title, currentArray, currentIndex, currentOpts)

{ return '<span id="fancybox-title-inside">Image ' + (currentIndex + 1) + ' of ' +    currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
}
});                                       
});

我已经为此耗费了好几个小时。

【问题讨论】:

    标签: jquery wordpress fancybox title


    【解决方案1】:

    您需要在代码中的每个 a 标签中添加 title 属性,以便花哨的框将其拾取。

    <a id="197_mark_image_1" href="http://54.165.58.29/wp-content/uploads/2014/06/MB2.jpg" class="btn" rel="map_gallery" style="  position: absolute; top:39px; left:152px; " title="My image title">
      <!--img src="http://54.165.58.29/wp-content/plugins/floorplan-generator/images/camera-button.png" /-->
      <div onclick="addToFancyboxWrap(this)" style=" width: 30px;height: 30px;-moz-border-radius: 50px;-webkit-border-radius: 50px;border-radius: 50px;color: #fff;"><img src="/wp-content/uploads/2014/08/circle_pink_hotspot2.png"></div></a>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-14
      • 1970-01-01
      • 2017-03-07
      • 2014-05-02
      • 1970-01-01
      相关资源
      最近更新 更多