A little question here. A client wants a temporary notice placed on the site that scrolls horizontally inside a module. I have applied the basics of this fiddle, created a custom.js file that loads in the replaced the $ with Jquery but it still does not scroll. I am not receiving any JS errors in the console either? I have set 'Prepare content' to yes and it doesn't make a difference.
The html code itself is:
<div style="width: 100%;">
<div class="marquee" style="width: 50%; float: left; padding-top: 8px;"><span class="marquee-text"><strong><a href="/thurso" title="Thurso opening times changing">Thurso </a></strong>Late Opening times changing. As from Nov 6th we will shut at 6pm</span></div>
<div style="text-align: right; width: 50%; float: right;"><a href="index.php?option=com_content&view=article&id=5&Itemid=111"><strong>Thurso</strong></a> 01847 892387 <a href="index.php?option=com_content&view=article&id=6&Itemid=140"><strong>Wick</strong></a> 01955 602088 <a href="https://www.facebook.com/DonaldSMcGregorPartners/" target="_blank" rel="noopener noreferrer"><i class="fa fa-facebook-official fa-2x"></i></a></div>
</div>
and the adapted js code is:
var marquee = jQuery('div.marquee');
marquee.each(function() {
var mar = jQuery(this),indent = mar.width();
mar.marquee = function() {
indent--;
mar.css('text-indent',indent);
if (indent < -1 * mar.children('span.marquee-text').width()) {
indent = mar.width();
}
};
mar.data('interval',setInterval(mar.marquee,1000/60));
});
Any suggestions as to how I can get this to work? Thank you in advance. enter link description here