zurb / twentytwenty

jQuery Plugin to Compare Images
ISC License
1.27k stars 295 forks source link

Translate after - before label #49

Closed prankyboy closed 7 years ago

prankyboy commented 8 years ago

Yu - huuu on which file I can translate after - before? thx

mhayes commented 8 years ago

Right now it's using a CSS :before pseudo selector to set the text. If you wanted to change the text you will need to use CSS like so:

.twentytwenty-after-label:before {
  content: "NEW AFTER TEXT";
}
.twentytwenty-before-label:before {
  content: "NEW BEFORE TEXT";
}
francesco14 commented 8 years ago

I just made a PR to manage the before and after label by the title attributes on the images. No more need to change them by CSS. #59 .

I hope it helps! Bye

raphaeleidus commented 7 years ago

This is now possible using

$(".twentytwenty-container").twentytwenty({
  before_label: 'Antes', // Set a custom before label
  after_label: 'Después' // Set a custom after label
});