Ai
3 Star 0 Fork 1

Gitee 极速下载/socket-io-ios

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/socketio/socket.io-client-swift
克隆/下载
jazzy.js 1.74 KB
一键复制 编辑 原始数据 按行查看 历史
Erik Little 提交于 2020-11-08 08:19 +08:00 . Start working on migration guide
window.jazzy = {'docset': false}
if (typeof window.dash != 'undefined') {
document.documentElement.className += ' dash'
window.jazzy.docset = true
}
if (navigator.userAgent.match(/xcode/i)) {
document.documentElement.className += ' xcode'
window.jazzy.docset = true
}
function toggleItem($link, $content) {
var animationDuration = 300;
$link.toggleClass('token-open');
$content.slideToggle(animationDuration);
}
function itemLinkToContent($link) {
return $link.parent().parent().next();
}
// On doc load + hash-change, open any targetted item
function openCurrentItemIfClosed() {
if (window.jazzy.docset) {
return;
}
var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token');
$content = itemLinkToContent($link);
if ($content.is(':hidden')) {
toggleItem($link, $content);
}
}
$(openCurrentItemIfClosed);
$(window).on('hashchange', openCurrentItemIfClosed);
// On item link ('token') click, toggle its discussion
$('.token').on('click', function(event) {
if (window.jazzy.docset) {
return;
}
var $link = $(this);
toggleItem($link, itemLinkToContent($link));
// Keeps the document from jumping to the hash.
var href = $link.attr('href');
if (history.pushState) {
history.pushState({}, '', href);
} else {
location.hash = href;
}
event.preventDefault();
});
// Clicks on links to the current, closed, item need to open the item
$("a:not('.token')").on('click', function() {
if (location == this.href) {
openCurrentItemIfClosed();
}
});
// KaTeX rendering
if ("katex" in window) {
$($('.math').each( (_, element) => {
katex.render(element.textContent, element, {
displayMode: $(element).hasClass('m-block'),
throwOnError: false,
trust: true
});
}))
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Swift
1
https://gitee.com/mirrors/socket-io-ios.git
git@gitee.com:mirrors/socket-io-ios.git
mirrors
socket-io-ios
socket-io-ios
master

搜索帮助