mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-18 19:00:24 +00:00
Merge pull request #118 from alexvargasbenamburg/master
fix #77 : no wrap images that already wrapped
This commit is contained in:
commit
dea425fc75
1 changed files with 3 additions and 1 deletions
|
@ -21,7 +21,9 @@ var images = $("div#body-inner img").not(".inline");
|
|||
// Wrap image inside a featherlight (to get a full size view in a popup)
|
||||
images.wrap(function(){
|
||||
var image =$(this);
|
||||
return "<a href='" + image[0].src + "' data-featherlight='image'></a>";
|
||||
if (!image.parent("a").length) {
|
||||
return "<a href='" + image[0].src + "' data-featherlight='image'></a>";
|
||||
}
|
||||
});
|
||||
|
||||
// Change styles, depending on parameters set to the image
|
||||
|
|
Loading…
Reference in a new issue