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:23] – 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 == "" | ||
| - | $link = jQUery('< | + | console.log("Parse images legends...", |
| - | $link.on(" | + | |
| - | var $parent | + | $link = jQuery('< |
| - | if ($parent.prop('nodeName').toLowerCase() == " | + | jQuery(this).wrap('<div class=" |
| + | jQuery(this).after($link); | ||
| - | jQuery(this).parent().after($link); | + | if (jQuery(this).hasClass(" |
| - | + | if (jQuery(this).hasClass(" | |
| - | } else if ($parent.prop(' | + | if (jQuery(this).hasClass(" |
| - | + | ||
| - | jQuery(this).after($link); | + | |
| - | + | ||
| - | } else { | + | |
| - | + | ||
| - | jQuery(this).after($link); | + | |
| - | } | + | |
| }); | }); | ||
| + | |||
| + | jQuery(" | ||
| }}); | }}); | ||
| Ligne 31: | Ligne 28: | ||
| </ | </ | ||
| - | .img-legend { text-decoration: | + | .img-legend, |
| + | .img-legend: | ||
| + | a: | ||
| + | |||
| + | text-decoration: | ||
| + | font-size: 0.9em; | ||
| + | color: | ||
| + | } | ||
| </ | </ | ||