Autodate in footer not working on Mobiles

I am using some supplied code to display the YEAR automatically

This code in Footer JS

jQuery(document).ready(function() {
  var currentYear = (new Date).getFullYear();
  jQuery("#year").text( (new Date).getFullYear() );
});

This code in the text area of the footer.

<span id="year">TEXT</span>

It works perfectly for Desktop but not for the other view.

Please see this 2 min video for clarification (secure note)

Hi @JohnC,

I checked your site and found out that you have two spans with the ID year in the footer section. One is in a bar that is only visible on mobile and the other is only visible on desktops. See screencast in secure note.

Please make sure that you only use an ID once on a page. Try changing it to class instead and update your JS code as well.

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.