Skip to content

Commit

Permalink
Merge pull request #93 from leecollings/master
Browse files Browse the repository at this point in the history
Disabled finding overlay container
  • Loading branch information
raphaeleidus authored Aug 6, 2018
2 parents 05f53c1 + 1b1ccce commit ccd4511
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions js/jquery.twentytwenty.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
container.wrap("<div class='twentytwenty-wrapper twentytwenty-" + sliderOrientation + "'></div>");
if(!options.no_overlay) {
container.append("<div class='twentytwenty-overlay'></div>");
var overlay = container.find(".twentytwenty-overlay");
overlay.append("<div class='twentytwenty-before-label' data-content='"+options.before_label+"'></div>");
overlay.append("<div class='twentytwenty-after-label' data-content='"+options.after_label+"'></div>");
}
var beforeImg = container.find("img:first");
var afterImg = container.find("img:last");
Expand All @@ -34,11 +37,7 @@
container.addClass("twentytwenty-container");
beforeImg.addClass("twentytwenty-before");
afterImg.addClass("twentytwenty-after");

var overlay = container.find(".twentytwenty-overlay");
overlay.append("<div class='twentytwenty-before-label' data-content='"+options.before_label+"'></div>");
overlay.append("<div class='twentytwenty-after-label' data-content='"+options.after_label+"'></div>");


var calcOffset = function(dimensionPct) {
var w = beforeImg.width();
var h = beforeImg.height();
Expand Down

0 comments on commit ccd4511

Please sign in to comment.