Diff
checker
Texte
Texte
Images
Documents
Excel
Dossiers
Legal
Enterprise
Application de bureau
Prix
Se connecter
Télécharger Diffchecker Desktop
Comparer le texte
Trouver la différence entre deux fichiers texte
Outils
Historique
Éditeur live
Cacher identiques
Sans retour à la ligne
Vue
Divisé
Unifié
Niveau de précision
Intelligent
Mot
Caractère
Coloration syntaxique
Choisir la syntaxe
Ignorer
Transformer le texte
Aller au premier écart
Modifier l'entrée
Diffchecker Desktop
La façon la plus sécurisée d'utiliser Diffchecker. Obtenez l'application Diffchecker Desktop : vos diffs ne quittent jamais votre ordinateur !
Obtenir Desktop
Untitled diff
Créé
il y a 11 ans
Le diff n'expire jamais
Effacer
Exporter
Partager
Expliquer
38 suppressions
Lignes
Total
Supprimé
Caractères
Total
Supprimé
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
46 lignes
Copier tout
65 ajouts
Lignes
Total
Ajouté
Caractères
Total
Ajouté
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
72 lignes
Copier tout
Copier
Copié
Copier
Copié
$
(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>';
Copier
Copié
Copier
Copié
$('#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>';
Copier
Copié
Copier
Copié
$('#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)
});
});
Copier
Copié
Copier
Copié
});
});
Différences enregistrées
Texte d'origine
Ouvrir un fichier
$(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 */ }); });
Texte modifié
Ouvrir un fichier
$(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) }); });
Trouver la différence