Ad lightbox

Add lightbox as an inline image handling.
This commit is contained in:
Danang Probo Sayekti 2014-02-14 16:38:28 +07:00
commit 6a7c090a68
11 changed files with 248 additions and 7 deletions

10
system/resources/htmly.js Normal file
View file

@ -0,0 +1,10 @@
(function ($) {
$(document).ready(function() {
$('.post-teaser img, .post-body img').each(function() {
var currentImage = $(this);
currentImage.wrap("<a class='img-wrap' title='" + currentImage.attr("alt") + "' data-lightbox='lightbox' href='" + currentImage.attr("src") + "'></a>");
});
});
})(jQuery);