Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| js:img_legend [2023/04/26 15:34] – avillepreux | js:img_legend [2024/12/03 09:52] (Version actuelle) – avillepreux | ||
|---|---|---|---|
| Ligne 3: | Ligne 3: | ||
| jQuery(function() { if (typeof img_legend === ' | jQuery(function() { if (typeof img_legend === ' | ||
| - | jQuery(" | + | console.log(" |
| + | |||
| + | jQuery(" | ||
| var title = jQuery(this).attr(" | var title = jQuery(this).attr(" | ||
| if (title == "" | if (title == "" | ||
| + | |||
| + | console.log(" | ||
| $link = jQuery('< | $link = jQuery('< | ||
| - | jQuery(this).wrap('< | + | jQuery(this).wrap('< |
| - | jQuery(this).parent().after($link); | + | jQuery(this).after($link); |
| - | jQuery(this).find(".img-legend").on("click", function(event) { event.preventDefault(); }); | + | if (jQuery(this).hasClass("medialeft" |
| + | if (jQuery(this).hasClass(" | ||
| + | if (jQuery(this).hasClass(" | ||
| + | }); | ||
| - | /* | + | jQuery(".img-legend").on("click", function(event) { event.preventDefault(); }); |
| - | var $parent = jQuery(this).parent(); | + | |
| - | + | ||
| - | if ($parent.prop(' | + | |
| - | + | ||
| - | jQuery(this).parent().after($link); | + | |
| - | + | ||
| - | } else if ($parent.prop(' | + | |
| - | + | ||
| - | jQuery(this).after($link); | + | |
| - | + | ||
| - | } else { | + | |
| - | + | ||
| - | jQuery(this).after($link); | + | |
| - | } | + | |
| - | */ | + | |
| - | }); | + | |
| }}); | }}); | ||
| Ligne 37: | Ligne 28: | ||
| </ | </ | ||
| - | .img-legend { text-decoration: | + | .img-legend, |
| + | .img-legend: | ||
| + | a: | ||
| + | |||
| + | text-decoration: | ||
| + | font-size: 0.9em; | ||
| + | color: | ||
| + | } | ||
| </ | </ | ||