Hello. I’ve been trying to change language with data tags inside divs. It works great on the current scene but when I jump to the next scene with buttons and divs that has the same classes they will be replaced with their original content.
A small example is the toggle on and off using jquery:
languageDefault = $('.language');
languageDefault.on('click', function() {
$(this).toggleClass('toggled');
if ($(this).hasClass('toggled')) {
summaryLang = 'summaryeng';
homeLang = 'homeeng';
} else {
summaryLang = 'summaryswe';
homeLang = 'homeswe';
}
$('#summaryLang').html($('#summaryLang').data(summaryLang));
$('#homeLang').html($('#homeLang').data(homeLang));
});
does anyone experiencing the same as I do? That classes can’t be changed over scenes?
Tried addClass and that does not help either. Still not affecting over scenes