Diff
checker
文本
文本
图像
文档
Excel
文件夹
Legal
Enterprise
桌面版
定价
登录
下载 Diffchecker 桌面版
比较文本
查找两个文本文件之间的差异
工具
历史
实时编辑器
折叠未更改行
关闭换行
视图
拆分
统一
比对精度
智能
单词
字符
语法高亮
选择语法
忽略
文本转换
转到第一个差异
编辑输入
Diffchecker Desktop
运行Diffchecker最安全的方式。获取Diffchecker桌面应用:您的差异永远不会离开您的电脑!
获取桌面版
Untitled diff
创建于
11年前
差异永不过期
清除
导出
分享
解释
38 删除
行
总计
删除
字符
总计
删除
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
46 行
全部复制
65 添加
行
总计
添加
字符
总计
添加
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
72 行
全部复制
复制
已复制
复制
已复制
$
(document).ready
(function () {
/* Run code only if page is loaded */
$
(function () {
$('#content').hide();
/* Hide content container */
var contentSearch = '<ul
>' +
$('#content').hide();
var contentSearch = '<ul
class="submenu"
>' +
'<li><img src=\'images/icons/youtube.png\' class=\'icon\'><a class=\'link\' href=\"#\">DuckDuckGo</a></li>' +
'<li><img src=\'images/icons/youtube.png\' class=\'icon\'><a class=\'link\' href=\"#\">DuckDuckGo</a></li>' +
'<li><img src=\'images/icons/youtube.png\' class=\'icon\'><a class=\'link\' href=\"#\">Google</a></li>' +
'<li><img src=\'images/icons/youtube.png\' class=\'icon\'><a class=\'link\' href=\"#\">Google</a></li>' +
'</ul>';
'</ul>';
复制
已复制
复制
已复制
$('#search').hover(function () { /* Headline is hovered upon */
var pos = $(this).position(); /* Get the position of the headline container relative to its parent */
var headlineWdth = $(this).width(); /* Get the width of the headline container */
$('#content').html(contentSearch); /* Content container gets its content filled in */
var contentWdth = $('#content').width(); /* Get the width of the content container */
var contentWdthRemaining = contentWdth - headlineWdth; /* Content width minus headline width equals the remaining width of the content container */
var posSubtract = contentWdthRemaining / 2;
/* Remaining content container width will be divided by 2, that way it can be later subtracted from the offset position
in order for us to place the content container directly bellow the headline */
$('#content').css({
'left': pos.left - posSubtract
}); /* Place content container right bellow the headline */
$('#content').slideDown('fast'); /* Show content container with a fast slide down animation */
}, function () { /* The headline is not hovered upon anymore */
$('#content').hide(); /* immediately hide the content container */
$('#content').html(''); /* Clear previous html input so it won't be seen in the page inspector tool */
});
var contentNews = '<ul>' +
var contentNews = '<ul>' +
'<li><img src=\'images/icons/youtube.png\' class=\'icon\'><a class=\'link\' href=\"#\">kekhueawd</a></li>' +
'<li><img src=\'images/icons/youtube.png\' class=\'icon\'><a class=\'link\' href=\"#\">kekhueawd</a></li>' +
'<li><img src=\'images/icons/youtube.png\' class=\'icon\'><a class=\'link\' href=\"#\">eheheheheheheeh</a></li>' +
'<li><img src=\'images/icons/youtube.png\' class=\'icon\'><a class=\'link\' href=\"#\">eheheheheheheeh</a></li>' +
'</ul>';
'</ul>';
复制
已复制
复制
已复制
$('#news').hover(function () { /* Headline is hovered upon */
var pos
= $(this).position();
/* Get the position of the headline container relative to its parent */
var submenuTimeout;
var headlineWdth = $(this).width();
/* Get the width of the headline container */
$('#content').html(contentNews); /* Content container gets its content filled in */
debugger;
var contentWdth
= $('#content').width();
/* Get the width of the content container */
var contentWdthRemaining = contentWdth - headlineWdth; /* Content width minus headline width equals the remaining width of the content container */
$(document.body)
var posSubtract = contentWdthRemaining / 2;
/* Remaining content container width will be divided by 2, that way it can be later subtracted from the offset position
.on('mouseover', '#search', function (e) {
in order for us to place the content container directly bellow the headline */
$('#content')
.css({
var pos
= $(this).position();
'left': pos.left - posSubtract
var headlineWdth = $(this).width();
}); /* Place content container right bellow the headline */
$('#content').slideDown('fast'); /* Show content container with a fast slide down animation */
$('#content').html(contentSearch);
}, function () { /* The headline is not hovered upon anymore */
$('#content').hide(); /* immediately hide the content container */
var contentWdth
= $('#content').width();
$('#content').html(''); /* Clear previous html input so it won't be seen in the page inspector tool */
var contentWdthRemaining = contentWdth - headlineWdth;
var posSubtract = contentWdthRemaining / 2;
$('#content')
.css({
'left': pos.left - posSubtract
})
.slideDown('fast');
})
.on('mouseover', '#news', function () {
var pos = $(this).position();
var headlineWdth = $(this).width();
$('#content').html(contentNews);
var contentWdth = $('#content').width();
var contentWdthRemaining = contentWdth - headlineWdth;
var posSubtract = contentWdthRemaining / 2;
$('#content')
.css({
'left': pos.left - posSubtract
})
.slideDown('fast');
})
.on('mouseover', '.submenu', function () {
clearTimeout(submenuTimeout);
})
$('#nav').on('mouseleave', function (e) {
submenuTimeout = setTimeout(function () {
$('#content').hide().html('');
}, 50)
});
});
复制
已复制
复制
已复制
});
});
已保存差异
原始文本
打开文件
$(document).ready(function () { /* Run code only if page is loaded */ $('#content').hide(); /* Hide content container */ var contentSearch = '<ul>' + '<li><img src=\'images/icons/youtube.png\' class=\'icon\'><a class=\'link\' href=\"#\">DuckDuckGo</a></li>' + '<li><img src=\'images/icons/youtube.png\' class=\'icon\'><a class=\'link\' href=\"#\">Google</a></li>' + '</ul>'; $('#search').hover(function () { /* Headline is hovered upon */ var pos = $(this).position(); /* Get the position of the headline container relative to its parent */ var headlineWdth = $(this).width(); /* Get the width of the headline container */ $('#content').html(contentSearch); /* Content container gets its content filled in */ var contentWdth = $('#content').width(); /* Get the width of the content container */ var contentWdthRemaining = contentWdth - headlineWdth; /* Content width minus headline width equals the remaining width of the content container */ var posSubtract = contentWdthRemaining / 2; /* Remaining content container width will be divided by 2, that way it can be later subtracted from the offset position in order for us to place the content container directly bellow the headline */ $('#content').css({ 'left': pos.left - posSubtract }); /* Place content container right bellow the headline */ $('#content').slideDown('fast'); /* Show content container with a fast slide down animation */ }, function () { /* The headline is not hovered upon anymore */ $('#content').hide(); /* immediately hide the content container */ $('#content').html(''); /* Clear previous html input so it won't be seen in the page inspector tool */ }); var contentNews = '<ul>' + '<li><img src=\'images/icons/youtube.png\' class=\'icon\'><a class=\'link\' href=\"#\">kekhueawd</a></li>' + '<li><img src=\'images/icons/youtube.png\' class=\'icon\'><a class=\'link\' href=\"#\">eheheheheheheeh</a></li>' + '</ul>'; $('#news').hover(function () { /* Headline is hovered upon */ var pos = $(this).position(); /* Get the position of the headline container relative to its parent */ var headlineWdth = $(this).width(); /* Get the width of the headline container */ $('#content').html(contentNews); /* Content container gets its content filled in */ var contentWdth = $('#content').width(); /* Get the width of the content container */ var contentWdthRemaining = contentWdth - headlineWdth; /* Content width minus headline width equals the remaining width of the content container */ var posSubtract = contentWdthRemaining / 2; /* Remaining content container width will be divided by 2, that way it can be later subtracted from the offset position in order for us to place the content container directly bellow the headline */ $('#content').css({ 'left': pos.left - posSubtract }); /* Place content container right bellow the headline */ $('#content').slideDown('fast'); /* Show content container with a fast slide down animation */ }, function () { /* The headline is not hovered upon anymore */ $('#content').hide(); /* immediately hide the content container */ $('#content').html(''); /* Clear previous html input so it won't be seen in the page inspector tool */ }); });
更改后文本
打开文件
$(function () { $('#content').hide(); var contentSearch = '<ul class="submenu">' + '<li><img src=\'images/icons/youtube.png\' class=\'icon\'><a class=\'link\' href=\"#\">DuckDuckGo</a></li>' + '<li><img src=\'images/icons/youtube.png\' class=\'icon\'><a class=\'link\' href=\"#\">Google</a></li>' + '</ul>'; var contentNews = '<ul>' + '<li><img src=\'images/icons/youtube.png\' class=\'icon\'><a class=\'link\' href=\"#\">kekhueawd</a></li>' + '<li><img src=\'images/icons/youtube.png\' class=\'icon\'><a class=\'link\' href=\"#\">eheheheheheheeh</a></li>' + '</ul>'; var submenuTimeout; debugger; $(document.body) .on('mouseover', '#search', function (e) { var pos = $(this).position(); var headlineWdth = $(this).width(); $('#content').html(contentSearch); var contentWdth = $('#content').width(); var contentWdthRemaining = contentWdth - headlineWdth; var posSubtract = contentWdthRemaining / 2; $('#content') .css({ 'left': pos.left - posSubtract }) .slideDown('fast'); }) .on('mouseover', '#news', function () { var pos = $(this).position(); var headlineWdth = $(this).width(); $('#content').html(contentNews); var contentWdth = $('#content').width(); var contentWdthRemaining = contentWdth - headlineWdth; var posSubtract = contentWdthRemaining / 2; $('#content') .css({ 'left': pos.left - posSubtract }) .slideDown('fast'); }) .on('mouseover', '.submenu', function () { clearTimeout(submenuTimeout); }) $('#nav').on('mouseleave', function (e) { submenuTimeout = setTimeout(function () { $('#content').hide().html(''); }, 50) }); });
查找差异