diff --git a/modules/src/player.js b/modules/src/player.js index 8a165b1098..be2d296a27 100644 --- a/modules/src/player.js +++ b/modules/src/player.js @@ -466,9 +466,13 @@ $(function() { }; } - $content.append($(hbsTemplate).first() + const $elemContent = $('
'); + + $elemContent.html($(hbsTemplate).first().prop('outerHTML')); + + $content.append($elemContent .attr('id', data.elementId) - .addClass(`${data.id}--item`) + .addClass(`${data.uniqueID}--item`) .css(cssStyles) .prop('outerHTML')); }; @@ -541,7 +545,7 @@ $(function() { if (templateAlreadyAdded) { $target.xiboElementsRender( renderData, - $content.find(`.${templateData.id}--item`), + $content.find(`.${templateData.uniqueID}--item`), ); // Handle the rendering of the template diff --git a/modules/src/xibo-elements-render.js b/modules/src/xibo-elements-render.js index e7d7f54e63..e2105cadc7 100644 --- a/modules/src/xibo-elements-render.js +++ b/modules/src/xibo-elements-render.js @@ -93,7 +93,7 @@ jQuery.fn.extend({ options.effect === 'noTransition' || options.effect === 'none' ) ? noTransitionSpeed : options.speed, timeout: timeout, - slides: `> .${options.id}--item`, + slides: `> .${options.parentId}--item`, autoHeight: false, sync: false, });