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) }); });
尋找差異