mirror of
https://github.com/danpros/htmly.git
synced 2026-04-22 13:36:22 +05:30
Ad lightbox
Add lightbox as an inline image handling.
This commit is contained in:
parent
557f99c18d
commit
6a7c090a68
11 changed files with 248 additions and 7 deletions
10
system/resources/htmly.js
Normal file
10
system/resources/htmly.js
Normal 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue