本文介绍了深度链接基础5个选项卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新

Update

截至 v5.5.1 Foundation选项卡支持深度链接.

As of v5.5.1 Foundation Tabs support deep linking.

深层链接不适用于Foundation 5 Tabs,因此我正在尝试进行修改.

Deep linking doesn't work with Foundation 5 Tabs so I am attempting to work on a hack.

我的想法是使用jQuery触发相应选项卡上的单击,但它不起作用.

My thought is to use jQuery to trigger a click on the appropriate tab but it isn't working.

var hash = window.location.hash;
$(function() {
  $(window).on('load', function () {
    $(hash).trigger( "click" );
    console.log(hash)
  });
});

console.log显示正确的哈希值,但单击"似乎无效.

The console.log shows the correct hash but the "click" doesn't appear to work.

我想知道使我能够深层链接Foundation 5选项卡的任何变通方法或黑客程序.

I would like to know any workarounds or hacks that allow me deep link Foundation 5 Tabs.

推荐答案

Foundation 5现在通过属性data-options="deep_linking:true"

This is now supported as standard by Foundation 5 via the attribute data-options="deep_linking:true"

文档:

这篇关于深度链接基础5个选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 06:42